Documentation
¶
Index ¶
- Variables
- func BuildKBAgentRetryPolicy(retryPolicy *appsv1.RetryPolicy) *proto.RetryPolicy
- func FileTemplateChanges(created, removed, updated string) map[string]string
- func IgnoreNotDefined(err error) error
- func SelectTargetPods(pods []*corev1.Pod, pod *corev1.Pod, spec *appsv1.Action) ([]*corev1.Pod, error)
- func UDFActionName(name string) string
- type Lifecycle
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrActionNotDefined = errors.New("action is not defined") ErrActionNotImplemented = errors.New("action is not implemented") ErrPreconditionFailed = errors.New("action precondition is not met") ErrActionInProgress = errors.New("action is in progress") ErrActionBusy = errors.New("action is busy") ErrActionTimedOut = errors.New("action timed-out") ErrActionFailed = errors.New("action failed") ErrActionInternalError = errors.New("action internal error") )
Functions ¶
func BuildKBAgentRetryPolicy ¶
func BuildKBAgentRetryPolicy(retryPolicy *appsv1.RetryPolicy) *proto.RetryPolicy
BuildKBAgentRetryPolicy normalizes the API retry policy into the kbagent wire contract.
func FileTemplateChanges ¶
func IgnoreNotDefined ¶
func SelectTargetPods ¶
func UDFActionName ¶
Types ¶
type Lifecycle ¶
type Lifecycle interface {
PostProvision(ctx context.Context, cli client.Reader, opts *Options) error
PreTerminate(ctx context.Context, cli client.Reader, opts *Options) error
RoleProbe(ctx context.Context, cli client.Reader, opts *Options) ([]byte, error)
Switchover(ctx context.Context, cli client.Reader, opts *Options, candidate string) error
MemberJoin(ctx context.Context, cli client.Reader, opts *Options) error
MemberLeave(ctx context.Context, cli client.Reader, opts *Options) error
Reconfigure(ctx context.Context, cli client.Reader, opts *Options, args map[string]string) error
AccountProvision(ctx context.Context, cli client.Reader, opts *Options, statement, user, password string) error
UserDefined(ctx context.Context, cli client.Reader, opts *Options, name string, action *appsv1.Action, args map[string]string) error
}
type Options ¶
type Options struct {
Rerun bool
TimeoutSeconds *int32
RetryPolicy *appsv1.RetryPolicy
Arguments [][]string
PreConditionObjectSelector client.MatchingLabels
}
Click to show internal directories.
Click to hide internal directories.