Documentation
¶
Index ¶
- func DefaultClientFlags(sessionIdx *uint) []cli.Flag
- func NewCommands(config Config) []*cli.Command
- func NewSpaceCommand(config Config) *cli.Command
- func NewSpaceListCommand(config Config, sessionIdx *uint) *cli.Command
- func NewStatusCommand(config Config) *cli.Command
- func NewWhoamiCommand(config Config) *cli.Command
- func RunSpaceList(config Config, c *cli.Context, outputFormat string, sessionIdx uint32, ...) error
- func RunStatus(config Config, c *cli.Context, outputFormat string, sessionIdx uint32) error
- func RunWhoami(config Config, c *cli.Context, outputFormat string, sessionIdx uint32) error
- type Client
- type ClientFactory
- type ClientFlags
- type Config
- type LockStateStream
- type ResourcesListStream
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientFlags ¶
DefaultClientFlags returns the browser-safe session flags for shared commands.
func NewCommands ¶
NewCommands builds the shared browser-safe Spacewave CLI command subset.
func NewSpaceCommand ¶
NewSpaceCommand builds the shared space command group.
func NewSpaceListCommand ¶
NewSpaceListCommand builds the shared space list subcommand.
func NewStatusCommand ¶
NewStatusCommand builds the shared status command.
func NewWhoamiCommand ¶
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.
Types ¶
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 ¶
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.