common

package
v0.0.0-...-d7e1125 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpStatefulSetDiff

func DumpStatefulSetDiff(host *api.Host, cur, new *apps.StatefulSet)

func GetObjectStatusFromMetas

func GetObjectStatusFromMetas(labeler interfaces.ILabeler, curMeta, newMeta meta.Object) api.ObjectStatus

GetObjectStatusFromMetas gets StatefulSet status from cur and new meta infos

func LogActionPlan

func LogActionPlan(ap *action_plan.ActionPlan)

LogActionPlan logs action plan

func LogCR

func LogCR(name string, cr api.ICustomResource)

LogCR writes a CR into the log

func LogOldAndNew

func LogOldAndNew(name string, old, new api.ICustomResource)

LogOldAndNew writes old and new CHIs into the log

Types

type ErrorCRUD

type ErrorCRUD error

ErrorCRUD specifies errors of the CRUD operations

var (
	ErrCRUDAbort          ErrorCRUD = errors.New("crud error - should abort")
	ErrCRUDIgnore         ErrorCRUD = errors.New("crud error - should ignore")
	ErrCRUDRecreate       ErrorCRUD = errors.New("crud error - should recreate")
	ErrCRUDUnexpectedFlow ErrorCRUD = errors.New("crud error - unexpected flow")
)

type ReconcileShardsAndHostsOptions

type ReconcileShardsAndHostsOptions struct {
	FullFanOut bool
}

ReconcileShardsAndHostsOptions is and options for reconciler

type ReconcileShardsAndHostsOptionsCtxKeyType

type ReconcileShardsAndHostsOptionsCtxKeyType string

ReconcileShardsAndHostsOptionsCtxKeyType specifies type for ReconcileShardsAndHostsOptionsCtxKey More details here on why do we need special type https://stackoverflow.com/questions/40891345/fix-should-not-use-basic-type-string-as-key-in-context-withvalue-golint

const ReconcileShardsAndHostsOptionsCtxKey ReconcileShardsAndHostsOptionsCtxKeyType = "ReconcileShardsAndHostsOptions"

ReconcileShardsAndHostsOptionsCtxKey specifies name of the key to be used for ReconcileShardsAndHostsOptions

type Task

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

task represents context of a worker. This also can be called "a reconcile task"

func NewTask

func NewTask(creatorNew, creatorOld interfaces.ICreator) *Task

NewTask creates new context

func (*Task) CmUpdate

func (t *Task) CmUpdate() time.Time

func (*Task) Creator

func (t *Task) Creator() interfaces.ICreator

func (*Task) CreatorPrev

func (t *Task) CreatorPrev() interfaces.ICreator

func (*Task) RegistryFailed

func (t *Task) RegistryFailed() *model.Registry

func (*Task) RegistryReconciled

func (t *Task) RegistryReconciled() *model.Registry

func (*Task) SetCmUpdate

func (t *Task) SetCmUpdate(update time.Time)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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