Versions in this module Expand all Collapse all v0 v0.0.3 Apr 15, 2022 v0.0.1 Apr 15, 2022 Changes in this version + var MaxBuckets uint32 = 10 + func ConfigMapName() string + func HasLeaderElection(ctx context.Context) bool + func NewStatefulSetBucketAndSet(buckets int) (reconciler.Bucket, *hash.BucketSet, error) + func UniqueID() (string, error) + func WithDynamicLeaderElectorBuilder(ctx context.Context, kc kubernetes.Interface, cc ComponentConfig) context.Context + func WithStandardLeaderElectorBuilder(ctx context.Context, kc kubernetes.Interface, cc ComponentConfig) context.Context + func WithStatefulSetElectorBuilder(ctx context.Context, cc ComponentConfig, bkt reconciler.Bucket) context.Context + type ComponentConfig struct + Buckets uint32 + Component string + Identity string + LeaseDuration time.Duration + LeaseName func(i uint32) string + LeaseNamesPrefixMapping map[string]string + RenewDeadline time.Duration + RetryPeriod time.Duration + type Config struct + Buckets uint32 + LeaseDuration time.Duration + LeaseNamesPrefixMapping map[string]string + RenewDeadline time.Duration + RetryPeriod time.Duration + func NewConfigFromConfigMap(configMap *corev1.ConfigMap) (*Config, error) + func NewConfigFromMap(data map[string]string) (*Config, error) + func (c *Config) GetComponentConfig(name string) ComponentConfig + type Elector interface + Run func(context.Context) + func BuildElector(ctx context.Context, la reconciler.LeaderAware, queueName string, ...) (Elector, error) + type ElectorWithInitialBuckets interface + InitialBuckets func() []reconciler.Bucket