func()

in pkg/azure/helpers.go [29:43]


func (az *azClient) configIsSame(fwRuleCollectionGrp *n.FirewallPolicyRuleCollectionGroup) bool {
	if az.configCache == nil {
		return false
	}

	jsonConfig, err := fwRuleCollectionGrp.MarshalJSON()
	if err != nil {
		klog.Error("Could not marshal fw config.")
	}
	klog.Info("input state = ", string(jsonConfig))
	klog.Info("cached state = ", string(*az.configCache))

	// The result will be 0 if a==b, -1 if a < b, and +1 if a > b.
	return az.configCache != nil && bytes.Compare(*az.configCache, jsonConfig) == 0
}