etcdmember

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeNow = time.Now

TimeNow is the function used by this check to get the current time.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	WithOldMembers(members []druidv1alpha1.EtcdMemberStatus) Builder
	WithResults(results []Result) Builder
	WithNowFunc(now func() metav1.Time) Builder
	Build() []druidv1alpha1.EtcdMemberStatus
}

Builder is an interface for building status objects for etcd members.

func NewBuilder

func NewBuilder() Builder

NewBuilder returns a Builder for a specific etcd member status.

type Checker

type Checker interface {
	Check(ctx context.Context, etcd druidv1alpha1.Etcd) []Result
}

Checker is an interface to check the members of an etcd cluster.

func ReadyCheck

func ReadyCheck(cl client.Client, logger logr.Logger, etcdMemberNotReadyThreshold, etcdMemberUnknownThreshold time.Duration) Checker

ReadyCheck returns a check for the "Ready" condition.

type Result

type Result interface {
	ID() *string
	Name() string
	Role() *druidv1alpha1.EtcdRole
	Status() druidv1alpha1.EtcdMemberConditionStatus
	Reason() string
}

Result is an interface to capture the result of checks on etcd members.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL