status

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NewDefaultConditionBuilder is the default condition builder.
	NewDefaultConditionBuilder = condition.NewBuilder
	// NewDefaultEtcdMemberBuilder is the default etcd member builder.
	NewDefaultEtcdMemberBuilder = etcdmember.NewBuilder
	// ConditionChecks Checks are the registered condition checks.
	ConditionChecks = []ConditionCheckFn{
		condition.AllMembersCheck,
		condition.ReadyCheck,
		condition.BackupReadyCheck,
	}
	// EtcdMemberChecks are the etcd member checks.
	EtcdMemberChecks = []EtcdMemberCheckFn{
		etcdmember.ReadyCheck,
	}
)
View Source
var TimeNow = time.Now

TimeNow is the function used to get the current time.

Functions

This section is empty.

Types

type Checker added in v0.17.0

type Checker struct {
	// contains filtered or unexported fields
}

Checker checks Etcd status conditions and the status of the Etcd members.

func NewChecker

func NewChecker(cl client.Client, etcdMemberNotReadyThreshold, etcdMemberUnknownThreshold time.Duration) *Checker

NewChecker creates a new instance for checking the etcd status.

func (*Checker) Check added in v0.17.0

func (c *Checker) Check(ctx context.Context, logger logr.Logger, etcd *druidv1alpha1.Etcd) error

Check executes the status checks and mutates the passed status object with the corresponding results.

type ConditionCheckFn

type ConditionCheckFn func(client.Client) condition.Checker

ConditionCheckFn is a type alias for a function which returns an implementation of `Check`.

type EtcdMemberCheckFn

type EtcdMemberCheckFn func(client.Client, logr.Logger, time.Duration, time.Duration) etcdmember.Checker

EtcdMemberCheckFn is a type alias for a function which returns an implementation of `Check`.

Jump to

Keyboard shortcuts

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