statuscheck

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(mgr ctrl.Manager, client client.Client, logger logr.Logger, recorderBuilder *recorder.RecorderBuilder) error

Types

type Executor

type Executor interface {
	// Do will execute according to the status check configuration,
	// returns:
	// 1. the result status (true for success, false for failure).
	// 2. output of execution.
	// 3. errors if any, it will lead to throw away the result of the execution.
	Do() (bool, string, error)
	// Type provides the type of executor
	Type() string
}

type Manager

type Manager interface {
	// Add creates new workers for every status check.
	Add(statusCheck v1alpha1.StatusCheck) error
	// Get returns the cached results about the status check.
	Get(statusCheck v1alpha1.StatusCheck) (Result, bool)
	// Delete handles cleaning up the removed status check state, including terminating workers and
	// deleting cached results.
	// This should be called when StatusCheck is deleted.
	Delete(key types.NamespacedName)
	// Complete handles terminating workers, but not deleting cached results.
	// This should be called when StatusCheck is completed.
	Complete(statusCheck v1alpha1.StatusCheck)
}

func NewManager

func NewManager(logger logr.Logger, eventRecorder recorder.ChaosRecorder, newExecutorFunc newExecutorFunc) Manager

type Reconciler

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

func NewReconciler

func NewReconciler(logger logr.Logger, kubeClient client.Client, eventRecorder recorder.ChaosRecorder, manager Manager) *Reconciler

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

type Result

type Result struct {
	Records []v1alpha1.StatusCheckRecord
	Count   int64
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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