MCPcopy
hub / github.com/IBM/sarama / IsAtLeast

Method IsAtLeast

utils.go:134–143  ·  view source on GitHub ↗

IsAtLeast return true if and only if the version it is called on is greater than or equal to the version passed in: V1.IsAtLeast(V2) // false V2.IsAtLeast(V1) // true

(other KafkaVersion)

Source from the content-addressed store, hash-verified

132// V1.IsAtLeast(V2) // false
133// V2.IsAtLeast(V1) // true
134func (v KafkaVersion) IsAtLeast(other KafkaVersion) bool {
135 for i := range v.version {
136 if v.version[i] > other.version[i] {
137 return true
138 } else if v.version[i] < other.version[i] {
139 return false
140 }
141 }
142 return true
143}
144
145// Effective constants defining the supported kafka versions.
146var (

Callers 15

versionRangeFunction · 0.80
addMethod · 0.80
buildRequestMethod · 0.80
wouldOverflowMethod · 0.80
fetchNewMessagesMethod · 0.80
testProducingMessagesFunction · 0.80
validateProducerMetricsFunction · 0.80
NewOffsetCommitRequestFunction · 0.80
TestConsumerTimestampsFunction · 0.80

Calls

no outgoing calls

Tested by 14

versionRangeFunction · 0.64
testProducingMessagesFunction · 0.64
validateProducerMetricsFunction · 0.64
TestConsumerTimestampsFunction · 0.64
TestVersionCompareFunction · 0.64
testRequestFunction · 0.64