lifecycle

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandlineArgs

func AddCommandlineArgs(flagset *pflag.FlagSet, opts *Options)

func NewEvictCommand

func NewEvictCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

func NewRestartCommand

func NewRestartCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

func NewStartCommand

func NewStartCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

func NewStopCommand

func NewStopCommand(clientConfig clientcmd.ClientConfig) *cobra.Command

Types

type Command

type Command string
const (
	Stop    Command = "stop"
	Start   Command = "start"
	Restart Command = "restart"
	Evict   Command = "evict"
)

type Lifecycle

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

func NewLifecycle

func NewLifecycle(cmd Command, clientConfig clientcmd.ClientConfig) *Lifecycle

func (*Lifecycle) Run

func (l *Lifecycle) Run(args []string) error

func (*Lifecycle) Usage

func (l *Lifecycle) Usage() string

type Manager

type Manager interface {
	Stop(ctx context.Context, name, namespace string) (msg string, err error)
	Start(ctx context.Context, name, namespace string) (msg string, err error)
	Restart(ctx context.Context, name, namespace string) (msg string, err error)
	Evict(ctx context.Context, name, namespace string) (msg string, err error)
}

type Options

type Options struct {
	Force        bool
	WaitComplete bool
	CreateOnly   bool
	Timeout      time.Duration
}

func DefaultOptions

func DefaultOptions() Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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