stateful

package
v0.6.0-alpha.14 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStatefulComponent

func NewStatefulComponent(cli client.Client,
	recorder record.EventRecorder,
	cluster *appsv1alpha1.Cluster,
	clusterVersion *appsv1alpha1.ClusterVersion,
	synthesizedComponent *component.SynthesizedComponent,
	dag *graph.DAG) *statefulComponent

Types

type Stateful

type Stateful struct {
	types.ComponentSetBase
}

func (*Stateful) GetPhaseWhenPodsNotReady

func (r *Stateful) GetPhaseWhenPodsNotReady(ctx context.Context, componentName string) (appsv1alpha1.ClusterComponentPhase, appsv1alpha1.ComponentMessageMap, error)

GetPhaseWhenPodsNotReady gets the component phase when the pods of component are not ready.

func (*Stateful) GetPhaseWhenPodsReadyAndProbeTimeout

func (r *Stateful) GetPhaseWhenPodsReadyAndProbeTimeout(pods []*corev1.Pod) (appsv1alpha1.ClusterComponentPhase, appsv1alpha1.ComponentMessageMap)

func (*Stateful) HandleHA

func (r *Stateful) HandleHA(ctx context.Context, obj client.Object) ([]graph.Vertex, error)

func (*Stateful) HandleRestart

func (r *Stateful) HandleRestart(context.Context, client.Object) ([]graph.Vertex, error)

func (*Stateful) HandleRoleChange

func (r *Stateful) HandleRoleChange(context.Context, client.Object) ([]graph.Vertex, error)

func (*Stateful) HandleUpdate

func (r *Stateful) HandleUpdate(ctx context.Context, obj client.Object) error

func (*Stateful) HandleUpdateWithProcessors

func (r *Stateful) HandleUpdateWithProcessors(ctx context.Context, obj client.Object,
	compStatusProcessor func(compDef *appsv1alpha1.ClusterComponentDefinition, pods []corev1.Pod, componentName string) error,
	priorityMapper func(component *appsv1alpha1.ClusterComponentDefinition) map[string]int,
	serialStrategyHandler, bestEffortParallelStrategyHandler, parallelStrategyHandler func(plan *util.Plan, pods []corev1.Pod, rolePriorityMap map[string]int)) error

HandleUpdateWithProcessors extends HandleUpdate() with custom processors REVIEW/TODO: (nashtsai)

  1. too many args

func (*Stateful) IsRunning

func (r *Stateful) IsRunning(ctx context.Context, obj client.Object) (bool, error)

func (*Stateful) PodIsAvailable

func (r *Stateful) PodIsAvailable(pod *corev1.Pod, minReadySeconds int32) bool

func (*Stateful) PodsReady

func (r *Stateful) PodsReady(ctx context.Context, obj client.Object) (bool, error)

func (*Stateful) SetComponent

func (r *Stateful) SetComponent(comp types.Component)

Jump to

Keyboard shortcuts

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