Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForController ¶
ForController 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 Func ¶
Func maps objects to hash keys. It returns an error if the prerequisites for sharding the given object are not fulfilled. If the returned key is empty, the object should not be assigned.
func FuncForResource ¶
func FuncForResource(gr metav1.GroupResource, ring *shardingv1alpha1.ControllerRing) (Func, error)
FuncForResource returns the key function that maps the given resource or its controller depending on whether the resource is listed as a resource or controlled resource in the given ring.
Click to show internal directories.
Click to hide internal directories.