Help us shape the future of Go! Take the 2026 Go Developer Survey

runner

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClientFlags

func DefaultClientFlags(sessionIdx *uint) []cli.Flag

DefaultClientFlags returns the browser-safe session flags for shared commands.

func NewCommands

func NewCommands(config Config) []*cli.Command

NewCommands builds the shared browser-safe Spacewave CLI command subset.

func NewSpaceCommand

func NewSpaceCommand(config Config) *cli.Command

NewSpaceCommand builds the shared space command group.

func NewSpaceListCommand

func NewSpaceListCommand(config Config, sessionIdx *uint) *cli.Command

NewSpaceListCommand builds the shared space list subcommand.

func NewStatusCommand

func NewStatusCommand(config Config) *cli.Command

NewStatusCommand builds the shared status command.

func NewWhoamiCommand

func NewWhoamiCommand(config Config) *cli.Command

NewWhoamiCommand builds the shared whoami command.

func RunSpaceList

func RunSpaceList(config Config, c *cli.Context, outputFormat string, sessionIdx uint32, watch bool) error

RunSpaceList executes the shared space list command against the configured client factory.

func RunStatus

func RunStatus(config Config, c *cli.Context, outputFormat string, sessionIdx uint32) error

RunStatus executes the shared status command against the configured client factory.

func RunWhoami

func RunWhoami(config Config, c *cli.Context, outputFormat string, sessionIdx uint32) error

RunWhoami executes the shared whoami command against the configured client factory.

Types

type Client

type Client interface {
	Close()
	MountSession(ctx context.Context, idx uint32) (Session, error)
}

Client is the minimal Spacewave session surface needed by shared CLI commands.

type ClientFactory

type ClientFactory interface {
	NewClient(ctx context.Context, c *cli.Context) (Client, error)
	StatusEndpoint(ctx context.Context, c *cli.Context) (string, error)
}

ClientFactory opens a command-scoped Spacewave SDK client for the selected transport.

type ClientFlags

type ClientFlags func(sessionIdx *uint) []cli.Flag

ClientFlags builds command flags that select the client session and transport.

type Config

type Config struct {
	ClientFactory       ClientFactory
	ClientFlags         ClientFlags
	Stdout              io.Writer
	Now                 func() time.Time
	MountSessionTimeout func() (time.Duration, error)
}

Config carries the injected transport and output sinks for shared CLI commands.

type LockStateStream

type LockStateStream interface {
	Close() error
	Recv() (*s4wave_session.WatchLockStateResponse, error)
}

LockStateStream streams session lock-state snapshots.

type ResourcesListStream

type ResourcesListStream interface {
	Close() error
	Recv() (*s4wave_session.WatchResourcesListResponse, error)
}

ResourcesListStream streams session resource-list snapshots.

type Session

type Session interface {
	Release()
	GetSessionInfo(ctx context.Context) (*s4wave_session.GetSessionInfoResponse, error)
	WatchResourcesList(ctx context.Context) (ResourcesListStream, error)
	WatchLockState(ctx context.Context) (LockStateStream, error)
	WatchRecoveryStatus(ctx context.Context) (*s4wave_status.RecoveryStatus, error)
}

Session is the minimal mounted session surface needed by shared CLI commands.

Jump to

Keyboard shortcuts

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