consensus

package
v0.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeRolePriorityMap

func ComposeRolePriorityMap(componentDef *appsv1alpha1.ClusterComponentDefinition) map[string]int

ComposeRolePriorityMap generates a priority map based on roles.

func UpdateConsensusSetRoleLabel

func UpdateConsensusSetRoleLabel(cli client.Client,
	reqCtx intctrlutil.RequestCtx,
	componentDef *appsv1alpha1.ClusterComponentDefinition,
	pod *corev1.Pod, role string) error

UpdateConsensusSetRoleLabel updates pod role label when internal container role changed

Types

type ConsensusComponent

type ConsensusComponent struct {
	stateful.StatefulComponent
}

func (*ConsensusComponent) GetPhaseWhenPodsNotReady

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

func (*ConsensusComponent) HandleProbeTimeoutWhenPodsReady

func (r *ConsensusComponent) HandleProbeTimeoutWhenPodsReady(ctx context.Context, recorder record.EventRecorder) (bool, error)

func (*ConsensusComponent) HandleUpdate

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

func (*ConsensusComponent) IsRunning

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

func (*ConsensusComponent) PodIsAvailable

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

func (*ConsensusComponent) PodsReady

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

Jump to

Keyboard shortcuts

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