lifecycle

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 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, wait, force bool) (msg string, err error)
	Start(ctx context.Context, name, namespace string, wait bool) (msg string, err error)
	Restart(ctx context.Context, name, namespace string, wait, force bool) (msg string, err error)
	Evict(ctx context.Context, name, namespace string, wait bool) (msg string, err error)
}

func NewManager

func NewManager(t Type, client kubeclient.Client) (Manager, error)

type Options

type Options struct {
	Force   bool
	Wait    bool
	Timeout time.Duration
}

func DefaultOptions

func DefaultOptions() Options

type Type

type Type string
const TypeVirtualMachineOperation Type = "VirtualMachineOperation"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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