MCPcopy Create free account
hub / github.com/cortexproject/cortex / ShouldExtendReplicaSetOnState

Method ShouldExtendReplicaSetOnState

pkg/ring/ring.go:1037–1039  ·  view source on GitHub ↗

ShouldExtendReplicaSetOnState returns true if given a state of instance that's going to be added to the replica set, the replica set size should be extended by 1 more instance for the given operation.

(s InstanceState)

Source from the content-addressed store, hash-verified

1035// added to the replica set, the replica set size should be extended by 1
1036// more instance for the given operation.
1037func (op Operation) ShouldExtendReplicaSetOnState(s InstanceState) bool {
1038 return op&(0x10000<<s) > 0
1039}
1040
1041// All states are healthy, no states extend replica set.
1042var allStatesRingOperation = Operation(0x0000ffff)

Callers 1

GetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected