actioncontext

package
v3.0.0-beta10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Boot = Properties{
		Name:            "boot",
		Target:          "booted",
		Progress:        "booting",
		Failure:         "boot failed",
		MustLock:        true,
		Order:           ordering.Desc,
		Freeze:          true,
		TimeoutKeywords: []string{"timeout"},
		PG:              true,
	}
	Delete = Properties{
		Name:     "delete",
		Target:   "deleted",
		Progress: "deleting",
		Failure:  "delete failed",
		Order:    ordering.Desc,
		MustLock: true,
	}
	Freeze = Properties{
		Name:     "freeze",
		Target:   "frozen",
		Progress: "freezing",
		Failure:  "freeze failed",
		PG:       true,
	}
	PRStart = Properties{
		Name:            "prstart",
		Failure:         "start failed",
		Progress:        "starting",
		Rollback:        true,
		TimeoutKeywords: []string{"start_timeout", "timeout"},
		PG:              true,
	}
	PRStop = Properties{
		Name:            "prstop",
		Failure:         "stop failed",
		MustLock:        true,
		Order:           ordering.Desc,
		Progress:        "stopping",
		TimeoutKeywords: []string{"stop_timeout", "timeout"},
		PG:              true,
	}
	Set = Properties{
		Name:     "set",
		MustLock: true,
	}
	SetProvisioned = Properties{
		Name:     "set provisioned",
		MustLock: true,
	}
	SetUnprovisioned = Properties{
		Name:     "set unprovisioned",
		MustLock: true,
	}
	Status = Properties{
		Name:      "status",
		PG:        true,
		MustLock:  true,
		LockGroup: "status",
	}
	Enable = Properties{
		Name:     "enable",
		MustLock: true,
	}
	Disable = Properties{
		Name:     "disable",
		MustLock: true,
	}
	Unset = Properties{
		Name:     "unset",
		MustLock: true,
	}
	ValidateConfig = Properties{
		Name:     "validate_config",
		MustLock: true,
	}
	Provision = Properties{
		Name:            "provision",
		Target:          "provisioned",
		Progress:        "provisioning",
		Failure:         "provision failed",
		MustLock:        true,
		Rollback:        true,
		TimeoutKeywords: []string{"provision_timeout", "timeout"},
		PG:              true,
	}
	PushResInfo = Properties{
		Name: "push resinfo",
		PG:   true,
	}
	Run = Properties{
		Name:            "run",
		TimeoutKeywords: []string{"run_timeout", "timeout"},
		PG:              true,
	}
	Shutdown = Properties{
		Name:            "shutdown",
		Target:          "shutdown",
		Progress:        "shutting",
		Failure:         "shutdown failed",
		Order:           ordering.Desc,
		TimeoutKeywords: []string{"stop_timeout", "timeout"},
		PG:              true,
	}
	Start = Properties{
		Name:            "start",
		Target:          "started",
		Progress:        "starting",
		Failure:         "start failed",
		MustLock:        true,
		Rollback:        true,
		TimeoutKeywords: []string{"start_timeout", "timeout"},
		PG:              true,
	}
	StartStandby = Properties{
		Name:            "startstandby",
		Progress:        "starting",
		Failure:         "start failed",
		MustLock:        true,
		Rollback:        true,
		TimeoutKeywords: []string{"start_timeout", "timeout"},
		PG:              true,
	}
	Stop = Properties{
		Name:            "stop",
		Target:          "stopped",
		Progress:        "stopping",
		Failure:         "stop failed",
		MustLock:        true,
		Order:           ordering.Desc,
		Freeze:          true,
		TimeoutKeywords: []string{"stop_timeout", "timeout"},
		PG:              true,
	}
	SyncFull = Properties{
		Name:     "sync_full",
		MustLock: true,
		PG:       true,
	}
	SyncIngest = Properties{
		Name:     "sync_ingest",
		MustLock: true,
		PG:       true,
	}
	SyncResync = Properties{
		Name:     "sync_resync",
		MustLock: true,
		PG:       true,
	}
	SyncUpdate = Properties{
		Name:     "sync_update",
		MustLock: true,
		PG:       true,
	}
	Unfreeze = Properties{
		Name:     "unfreeze",
		Target:   "unfrozen",
		Progress: "unfreezing",
		Failure:  "unfreeze failed",
		PG:       true,
	}
	Unprovision = Properties{
		Name:            "unprovision",
		Target:          "unprovisioned",
		Progress:        "unprovisioning",
		Failure:         "unprovision failed",
		MustLock:        true,
		Order:           ordering.Desc,
		TimeoutKeywords: []string{"unprovision_timeout", "timeout"},
		PG:              true,
	}
)

Functions

func AllSlaves

func AllSlaves(ctx context.Context) bool

func Env

func Env(ctx context.Context) []string

func HasResourceSelector

func HasResourceSelector(ctx context.Context) bool

func IsActionForMaster

func IsActionForMaster(ctx context.Context) bool

func IsActionForSlave

func IsActionForSlave(ctx context.Context, nodename string) bool

func IsConfirm

func IsConfirm(ctx context.Context) bool

func IsCron

func IsCron(ctx context.Context) bool

func IsForce

func IsForce(ctx context.Context) bool

func IsLeader

func IsLeader(ctx context.Context) bool

func IsLockDisabled

func IsLockDisabled(ctx context.Context) bool

func IsQuiet

func IsQuiet(ctx context.Context) bool

func IsRollbackDisabled

func IsRollbackDisabled(ctx context.Context) bool

func LockTimeout

func LockTimeout(ctx context.Context) time.Duration

func Master

func Master(ctx context.Context) bool

func MoveTo

func MoveTo(ctx context.Context) string

func RID

func RID(ctx context.Context) string

func Slaves

func Slaves(ctx context.Context) []string

func Subset

func Subset(ctx context.Context) string

func Tag

func Tag(ctx context.Context) string

func Target

func Target(ctx context.Context) []string

func To

func To(ctx context.Context) string

func Verbose

func Verbose(ctx context.Context) int

func WithAllSlaves

func WithAllSlaves(ctx context.Context, v bool) context.Context

func WithConfirm

func WithConfirm(ctx context.Context, v bool) context.Context

func WithCron

func WithCron(ctx context.Context, v bool) context.Context

func WithEnv

func WithEnv(ctx context.Context, s []string) context.Context

func WithForce

func WithForce(ctx context.Context, v bool) context.Context

func WithLeader

func WithLeader(ctx context.Context, v bool) context.Context

func WithLockDisabled

func WithLockDisabled(ctx context.Context, v bool) context.Context

func WithLockTimeout

func WithLockTimeout(ctx context.Context, d time.Duration) context.Context

func WithMaster

func WithMaster(ctx context.Context, v bool) context.Context

func WithMoveTo

func WithMoveTo(ctx context.Context, v string) context.Context

func WithProps

func WithProps(ctx context.Context, props Properties) context.Context

func WithQuiet

func WithQuiet(ctx context.Context, v bool) context.Context

func WithRID

func WithRID(ctx context.Context, s string) context.Context

func WithRollbackDisabled

func WithRollbackDisabled(ctx context.Context, v bool) context.Context

func WithSlaves

func WithSlaves(ctx context.Context, s []string) context.Context

func WithSubset

func WithSubset(ctx context.Context, s string) context.Context

func WithTag

func WithTag(ctx context.Context, s string) context.Context

func WithTarget

func WithTarget(ctx context.Context, s []string) context.Context

func WithTo

func WithTo(ctx context.Context, s string) context.Context

func WithVerbose

func WithVerbose(ctx context.Context, v int) context.Context

Types

type Properties

type Properties struct {
	Name            string
	Target          string
	Progress        string
	Failure         string
	Order           ordering.T
	MustLock        bool
	LockGroup       string
	Freeze          bool
	Rollback        bool
	PG              bool
	TimeoutKeywords []string
}

func Props

func Props(ctx context.Context) Properties

Jump to

Keyboard shortcuts

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