MCPcopy
hub / github.com/grpc/grpc-go / childPolicyConfigEqual

Function childPolicyConfigEqual

balancer/rls/config.go:84–101  ·  view source on GitHub ↗
(a, b map[string]json.RawMessage)

Source from the content-addressed store, hash-verified

82}
83
84func childPolicyConfigEqual(a, b map[string]json.RawMessage) bool {
85 if (b == nil) != (a == nil) {
86 return false
87 }
88 if len(b) != len(a) {
89 return false
90 }
91 for k, jsonA := range a {
92 jsonB, ok := b[k]
93 if !ok {
94 return false
95 }
96 if !bytes.Equal(jsonA, jsonB) {
97 return false
98 }
99 }
100 return true
101}
102
103// This struct resembles the JSON representation of the loadBalancing config
104// and makes it easier to unmarshal.

Callers 3

testEqualFunction · 0.85
EqualMethod · 0.85

Calls 1

EqualMethod · 0.65

Tested by 1

testEqualFunction · 0.68