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

Function generateRingInstanceWithInfo

pkg/ring/ring_test.go:2921–2930  ·  view source on GitHub ↗
(addr, zone string, tokens []uint32, registeredAt time.Time)

Source from the content-addressed store, hash-verified

2919}
2920
2921func generateRingInstanceWithInfo(addr, zone string, tokens []uint32, registeredAt time.Time) InstanceDesc {
2922 return InstanceDesc{
2923 Addr: addr,
2924 Timestamp: time.Now().Unix(),
2925 RegisteredTimestamp: registeredAt.Unix(),
2926 State: ACTIVE,
2927 Tokens: tokens,
2928 Zone: zone,
2929 }
2930}
2931
2932// compareReplicationSets returns the list of instance addresses which differ between the two sets.
2933func compareReplicationSets(first, second ReplicationSet) (added, removed []string) {

Calls

no outgoing calls

Tested by

no test coverage detected