client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package client provides a thin wrapper for CLI commands to communicate with the Masterblaster daemon over the unix domain socket. It also provides EnsureDaemon() to auto-start the daemon when needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureDaemon

func EnsureDaemon(baseDir string) error

EnsureDaemon starts the daemon if it's not already running. It finds the current mb binary, forks it with "serve" in a new session (setsid), and polls the socket until the daemon responds.

Types

type Client

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

Client communicates with the Masterblaster daemon over the unix socket.

func New

func New(baseDir string) *Client

New creates a new daemon client for the given base directory.

func (*Client) Destroy

func (c *Client) Destroy(name string) (*daemon.Response, error)

Destroy removes a sandbox and all its resources.

func (*Client) Down

func (c *Client) Down(name string, force bool) (*daemon.Response, error)

Down gracefully stops a sandbox.

func (*Client) List

func (c *Client) List() (*daemon.Response, error)

List returns all known sandboxes.

func (*Client) Ping

func (c *Client) Ping() error

Ping checks if the daemon is alive.

func (*Client) Status

func (c *Client) Status(name string, all bool) (*daemon.Response, error)

Status returns the state of a sandbox (or all if name is empty and all is true).

func (*Client) Up

func (c *Client) Up(name, configPath string) (*daemon.Response, error)

Up starts a new sandbox with the given config file.

Jump to

Keyboard shortcuts

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