compute

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SandboxActive added in v0.3.1

func SandboxActive(status compute_v1alpha.SandboxStatus) bool

SandboxActive reports whether a sandbox status indicates the sandbox may be actively running (PENDING, NOT_READY, or RUNNING).

func SandboxDead added in v0.3.1

func SandboxDead(status compute_v1alpha.SandboxStatus) bool

SandboxDead reports whether a sandbox status indicates the sandbox has stopped or failed (STOPPED or DEAD).

Types

type Client

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

Client provides a domain-specific client for Sandbox entities

func NewClient

func NewClient(log *slog.Logger, client rpc.Client) *Client

NewClient creates a new Compute client from an RPC client

func (*Client) DeleteSandbox

func (c *Client) DeleteSandbox(ctx context.Context, sandboxID string) error

DeleteSandbox deletes a sandbox, but only if it's dead

func (*Client) GetSandbox

func (c *Client) GetSandbox(ctx context.Context, sandboxID string) (*compute_v1alpha.Sandbox, error)

GetSandbox retrieves a sandbox by name or ID

func (*Client) StopSandbox

func (c *Client) StopSandbox(ctx context.Context, sandboxID string) error

StopSandbox updates a sandbox status to stopped

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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