Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromLeases ¶
func FromLeases(controllerRing *shardingv1alpha1.ControllerRing, leaseList *coordinationv1.LeaseList, now time.Time) (*consistenthash.Ring, leases.Shards)
FromLeases creates a ring from the given membership information (shard leases). It transforms shard leases into a usable form, i.e., a hash ring and leases.Shards. This is a central function in the sharding implementation bringing together the leases package with the consistenthash package. In short, it determines the subset of available shards and constructs a new consistenthash.Ring with it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.