powerstate

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 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 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"
)

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)
}

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 PowerState

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

func NewPowerState

func NewPowerState(cmd Command, clientConfig clientcmd.ClientConfig) *PowerState

func (*PowerState) Run

func (ps *PowerState) Run(args []string) error

func (*PowerState) Usage

func (ps *PowerState) Usage() string

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