Package statuscheck

import "github.com/chaos-mesh/chaos-mesh/controllers/statuscheck"

Overview ▾

func Bootstrap

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

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


Name Synopsis