machine

package
v1.20.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MPL-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TermModeAuto     = "auto"
	TermModeStrict   = "strict"
	TermModeFallback = "fallback"
)

Variables

This section is empty.

Functions

func NewCreateCmd

func NewCreateCmd(flags *flags.GlobalFlags) *cobra.Command

NewCreateCmd creates a new create command.

func NewDeleteCmd

func NewDeleteCmd(flags *flags.GlobalFlags) *cobra.Command

NewDeleteCmd creates a new delete command.

func NewDescribeCmd

func NewDescribeCmd(flags *flags.GlobalFlags) *cobra.Command

NewDescribeCmd creates a new describe command.

func NewDiagnosticsCmd

func NewDiagnosticsCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewInspectCmd

func NewInspectCmd(flags *flags.GlobalFlags) *cobra.Command

func NewListCmd

func NewListCmd(flags *flags.GlobalFlags) *cobra.Command

NewListCmd creates a new list command.

func NewLogsCmd

func NewLogsCmd(globalFlags *flags.GlobalFlags) *cobra.Command

func NewMachineCmd

func NewMachineCmd(flags *flags.GlobalFlags) *cobra.Command

NewMachineCmd returns a new root command.

func NewSSHCmd

func NewSSHCmd(flags *flags.GlobalFlags) *cobra.Command

NewSSHCmd creates a new ssh command.

func NewStartCmd

func NewStartCmd(flags *flags.GlobalFlags) *cobra.Command

NewStartCmd creates a new start command.

func NewStatusCmd

func NewStatusCmd(flags *flags.GlobalFlags) *cobra.Command

NewStatusCmd creates a new status command.

func NewStopCmd

func NewStopCmd(flags *flags.GlobalFlags) *cobra.Command

NewStopCmd creates a new stop command.

func RunSSHSession

func RunSSHSession(ctx context.Context, sshClient *ssh.Client, options RunSSHSessionOptions) error

func StartSSHSession

func StartSSHSession(ctx context.Context, options StartSSHSessionOptions) error

Types

type CollectionSource

type CollectionSource struct {
	Availability string `json:"availability"`
	Freshness    string `json:"freshness"`
	ErrorCode    string `json:"errorCode,omitempty"`
	Message      string `json:"message,omitempty"`
}

type CreateCmd

type CreateCmd struct {
	*flags.GlobalFlags

	ProviderOptions []string
}

CreateCmd holds the configuration.

func (*CreateCmd) Run

func (cmd *CreateCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type DeleteCmd

type DeleteCmd struct {
	*flags.GlobalFlags

	GracePeriod string
	Force       bool
}

DeleteCmd holds the configuration.

func (*DeleteCmd) Run

func (cmd *DeleteCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type DescribeCmd

type DescribeCmd struct {
	*flags.GlobalFlags
}

DescribeCmd holds the configuration.

func (*DescribeCmd) Run

func (cmd *DescribeCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type DiagnosticsCmd

type DiagnosticsCmd struct {
	*flags.GlobalFlags
	After    string
	Limit    int
	NoEvents bool
}

func (*DiagnosticsCmd) Run

func (cmd *DiagnosticsCmd) Run(
	ctx context.Context,
	args []string,
) error

type ExecFunc

type ExecFunc func(ctx context.Context, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

type InspectCmd

type InspectCmd struct {
	*flags.GlobalFlags
}

func (*InspectCmd) Run

func (cmd *InspectCmd) Run(ctx context.Context, args []string) error

type ListCmd

type ListCmd struct {
	*flags.GlobalFlags
}

ListCmd holds the configuration.

func (*ListCmd) Run

func (cmd *ListCmd) Run(ctx context.Context) error

Run runs the command logic.

type LogsCmd

type LogsCmd struct {
	*flags.GlobalFlags
	After  string
	Limit  int
	Follow bool
}

func (*LogsCmd) Run

func (cmd *LogsCmd) Run(
	ctx context.Context,
	args []string,
) error

type MachineDiagnostics

type MachineDiagnostics struct {
	SchemaVersion int                           `json:"schemaVersion"`
	Machine       MachineInfo                   `json:"machine"`
	Source        CollectionSource              `json:"source"`
	Daemon        *machinediagnostics.Status    `json:"daemon,omitempty"`
	Events        []machinediagnostics.Event    `json:"events,omitempty"`
	Cursor        machinediagnostics.CursorInfo `json:"cursor"`
}

type MachineInfo

type MachineInfo struct {
	ID       string `json:"id"`
	Context  string `json:"context"`
	Provider string `json:"provider"`
	State    string `json:"state"`
}

type RunSSHSessionOptions

type RunSSHSessionOptions struct {
	Command         string
	AgentForwarding bool
	SessionOptions  SSHSessionOptions
	Stderr          io.Writer
}

type SSHCmd

type SSHCmd struct {
	*flags.GlobalFlags

	Command         string
	AgentForwarding bool
	TermMode        string
	InstallTerminfo bool
}

SSHCmd holds the configuration.

func (*SSHCmd) Run

func (cmd *SSHCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type SSHSessionOptions

type SSHSessionOptions struct {
	TermMode        string
	InstallTerminfo bool
}

type StartCmd

type StartCmd struct {
	*flags.GlobalFlags
}

StartCmd holds the configuration.

func (*StartCmd) Run

func (cmd *StartCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type StartSSHSessionOptions

type StartSSHSessionOptions struct {
	User            string
	Command         string
	AgentForwarding bool
	SessionOptions  SSHSessionOptions
	OpenTransport   func(context.Context) (transport.ManagedConn, error)
	Exec            ExecFunc
	Stderr          io.Writer
}

type StatusCmd

type StatusCmd struct {
	*flags.GlobalFlags
}

StatusCmd holds the configuration.

func (*StatusCmd) Run

func (cmd *StatusCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

type StopCmd

type StopCmd struct {
	*flags.GlobalFlags
}

StopCmd holds the configuration.

func (*StopCmd) Run

func (cmd *StopCmd) Run(ctx context.Context, args []string) error

Run runs the command logic.

Jump to

Keyboard shortcuts

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