status

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 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.AllMembersReadyCheck,
		condition.ReadyCheck,
		condition.BackupReadyCheck,
		condition.DataVolumesReadyCheck,
	}
	// 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

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

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