Documentation
¶
Index ¶
- Variables
- func Register(a core.Arch, f func(kubernetes.ClientSet, logr.Logger) Actor)
- type Actor
- type ActorGroup
- type ActorManager
- type ActorResult
- func AbortWithError(err error) *ActorResult
- func NewResult(cmd Command) *ActorResult
- func NewResultWithError(cmd Command, err error) *ActorResult
- func NewResultWithValue(cmd Command, val any) *ActorResult
- func Pause() *ActorResult
- func Requeue() *ActorResult
- func RequeueAfter(t time.Duration) *ActorResult
- func RequeueWithError(err error) *ActorResult
- type Command
- type Object
- type VersionedActor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CommandRequeue = NewCommand("", "CommandRequeue") CommandAbort = NewCommand("", "CommandAbort") CommandPaused = NewCommand("", "CommandPaused") )
Functions ¶
Types ¶
type Actor ¶
type Actor interface {
// SupportedCommands return the supported commands of the actor
SupportedCommands() []Command
// Version return the version of the actor
// if the version is different from the previous version, the actor will be reloaded
Version() *semver.Version
// Do run the actor
Do(ctx context.Context, cluster types.Instance) *ActorResult
}
Actor actor is used process instance with specified state
type ActorGroup ¶
type ActorGroup map[string]VersionedActor
func (ActorGroup) Add ¶
func (ag ActorGroup) Add(a Actor)
func (ActorGroup) All ¶
func (ag ActorGroup) All() (ret [][]Actor)
func (ActorGroup) Get ¶
func (ag ActorGroup) Get(cmd Command) []Actor
type ActorManager ¶
type ActorManager struct {
// contains filtered or unexported fields
}
ActorManager
func NewActorManager ¶
func NewActorManager(cs kubernetes.ClientSet, logger logr.Logger) *ActorManager
NewActorManager
func (*ActorManager) Print ¶
func (m *ActorManager) Print()
type ActorResult ¶
type ActorResult struct {
// contains filtered or unexported fields
}
ActorResult
func AbortWithError ¶
func AbortWithError(err error) *ActorResult
func NewResult ¶
func NewResult(cmd Command) *ActorResult
func NewResultWithError ¶
func NewResultWithError(cmd Command, err error) *ActorResult
func NewResultWithValue ¶
func NewResultWithValue(cmd Command, val any) *ActorResult
func Pause ¶
func Pause() *ActorResult
func Requeue ¶
func Requeue() *ActorResult
func RequeueAfter ¶
func RequeueAfter(t time.Duration) *ActorResult
func RequeueWithError ¶
func RequeueWithError(err error) *ActorResult
type VersionedActor ¶
type VersionedActor []Actor
Click to show internal directories.
Click to hide internal directories.