Documentation ¶
Index ¶
- type LeaderElection
- func NewLeaderElection(clientset kubernetes.Interface, lockName string, ...) *LeaderElection
- func NewLeaderElectionWithConfigMaps(clientset kubernetes.Interface, lockName string, ...) *LeaderElection
- func NewLeaderElectionWithEndpoints(clientset kubernetes.Interface, lockName string, ...) *LeaderElection
- func NewLeaderElectionWithLeases(clientset kubernetes.Interface, lockName string, ...) *LeaderElection
- func (l *LeaderElection) Run() error
- func (l *LeaderElection) WithIdentity(identity string)
- func (l *LeaderElection) WithLeaseDuration(leaseDuration time.Duration)
- func (l *LeaderElection) WithNamespace(namespace string)
- func (l *LeaderElection) WithRenewDeadline(renewDeadline time.Duration)
- func (l *LeaderElection) WithRetryPeriod(retryPeriod time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeaderElection ¶
type LeaderElection struct {
// contains filtered or unexported fields
}
LeaderElection is a convenience wrapper around client-go's leader election library.
func NewLeaderElection ¶
func NewLeaderElection(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection
NewLeaderElection returns the default & preferred leader election type
func NewLeaderElectionWithConfigMaps ¶
func NewLeaderElectionWithConfigMaps(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection
NewLeaderElectionWithConfigMaps returns an implementation of leader election using ConfigMaps
func NewLeaderElectionWithEndpoints ¶
func NewLeaderElectionWithEndpoints(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection
NewLeaderElectionWithEndpoints returns an implementation of leader election using Endpoints
func NewLeaderElectionWithLeases ¶
func NewLeaderElectionWithLeases(clientset kubernetes.Interface, lockName string, runFunc func(ctx context.Context)) *LeaderElection
NewLeaderElectionWithLeases returns an implementation of leader election using Leases
func (*LeaderElection) WithIdentity ¶
func (l *LeaderElection) WithIdentity(identity string)
WithIdentity ...
func (*LeaderElection) WithLeaseDuration ¶
func (l *LeaderElection) WithLeaseDuration(leaseDuration time.Duration)
WithLeaseDuration ...
func (*LeaderElection) WithNamespace ¶
func (l *LeaderElection) WithNamespace(namespace string)
WithNamespace ...
func (*LeaderElection) WithRenewDeadline ¶
func (l *LeaderElection) WithRenewDeadline(renewDeadline time.Duration)
WithRenewDeadline ...
func (*LeaderElection) WithRetryPeriod ¶
func (l *LeaderElection) WithRetryPeriod(retryPeriod time.Duration)
WithRetryPeriod ...
Click to show internal directories.
Click to hide internal directories.