Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyForController ¶
KeyForController returns a ring key for the controller of the given object. It returns an empty key if the object doesn't have an ownerReference with controller=true".
Types ¶
type KeyFunc ¶
KeyFunc maps objects to hash keys. It returns an error if the prequisities for sharding the given object are not fulfilled. If the returned key is empty, the object should not be assigned.
func KeyFuncForResource ¶
func KeyFuncForResource(gr metav1.GroupResource, ring Ring) (KeyFunc, error)
KeyFuncForResource returns the key function that maps the given resource or its controller dependening on whether the resource is listed as a resource or controlled resource in the given ring.
type Ring ¶
type Ring interface { client.Object LeaseSelector() labels.Selector LabelShard() string LabelDrain() string RingResources() []shardingv1alpha1.RingResource }
Ring is the interface that is implemented by all ring objects that the sharder can handle.
Directories ¶
Path | Synopsis |
---|---|
Package leases implements logic for determining the state of shards based on their membership Lease object.
|
Package leases implements logic for determining the state of shards based on their membership Lease object. |
Click to show internal directories.
Click to hide internal directories.