MCPcopy
hub / github.com/etcd-io/etcd / Compare

Method Compare

pkg/adt/interval_tree.go:30–30  ·  view source on GitHub ↗

Compare gives the result of a 3-way comparison a.Compare(b) = 1 => a > b a.Compare(b) = 0 => a == b a.Compare(b) = -1 => a < b

(c Comparable)

Source from the content-addressed store, hash-verified

28 // a.Compare(b) = 0 => a == b
29 // a.Compare(b) = -1 => a < b
30 Compare(c Comparable) int
31}
32
33type rbcolor int

Callers 15

ContainsMethod · 0.95
TestGetSRVServiceFunction · 0.65
ExampleAuthFunction · 0.65
ExampleKV_txnFunction · 0.65
guardKeysMethod · 0.65
guardRangesMethod · 0.65
inRangeFunction · 0.65
rescindMethod · 0.65
tryModifyOpMethod · 0.65
acquireMethod · 0.65
deleteRangeRPCMethod · 0.65
revokeMethod · 0.65

Implementers 2

Intervalpkg/adt/interval_tree.go
nodeserver/etcdserver/api/v2store/node.go

Calls

no outgoing calls

Tested by 15

TestGetSRVServiceFunction · 0.52
ExampleAuthFunction · 0.52
ExampleKV_txnFunction · 0.52
TestIntervalTreeStabFunction · 0.52
LessMethod · 0.52
TestTxnCompareRangeFunction · 0.52
TestTxnNestedFunction · 0.52
TestKVForLearnerFunction · 0.52