kubestate

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddedState

type AddedState interface {
	ExistsState
	// contains filtered or unexported methods
}

type DeletedState

type DeletedState interface {
	DoesNotExistState
	// contains filtered or unexported methods
}

type DoesNotExistState

type DoesNotExistState interface {
	State
	// contains filtered or unexported methods
}

type ExistsState

type ExistsState interface {
	State
	// contains filtered or unexported methods
}

type Notifier

type Notifier interface {
	Notify(event ResourceEvent)
}

type NotifyFunc

type NotifyFunc func(event ResourceEvent)

type Reconciler

type Reconciler interface {
	Reconcile(ctx context.Context, in State) (out State, err error)
}

type ReconcilerChain

type ReconcilerChain []Reconciler

func (ReconcilerChain) Reconcile

func (r ReconcilerChain) Reconcile(ctx context.Context, in State) (out State, err error)

type ReconcilerFunc

type ReconcilerFunc func(ctx context.Context, in State) (out State, err error)

func (ReconcilerFunc) Reconcile

func (r ReconcilerFunc) Reconcile(ctx context.Context, in State) (out State, err error)

type ResourceEvent

type ResourceEvent interface {
	Type() ResourceEventType
	Resource() interface{}
}

func NewResourceEvent

func NewResourceEvent(eventType ResourceEventType, resource interface{}) ResourceEvent

type ResourceEventType

type ResourceEventType string

ResourceEventType tells an operator what kind of event has occurred on a given resource.

const (
	// ResourceAdded tells the operator that a given resources has been added.
	ResourceAdded ResourceEventType = "add"
	// ResourceUpdated tells the operator that a given resources has been updated.
	ResourceUpdated ResourceEventType = "update"
	// ResourceDeleted tells the operator that a given resources has been deleted.
	ResourceDeleted ResourceEventType = "delete"
)

type State

type State interface {
	Terminal() bool
	// contains filtered or unexported methods
}

func NewState

func NewState() State

type SyncFunc

type SyncFunc func(ctx context.Context, event ResourceEvent) error

SyncFunc syncs resource events.

func (SyncFunc) Sync

func (s SyncFunc) Sync(ctx context.Context, event ResourceEvent) error

Sync lets a sync func implement Syncer.

type Syncer

type Syncer interface {
	Sync(ctx context.Context, event ResourceEvent) error
}

Syncer describes something that syncs resource events.

type UpdatedState

type UpdatedState interface {
	ExistsState
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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