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 ¶
- func EnsureDaemon(baseDir string) error
- type Client
- func (c *Client) Destroy(name string) (*daemon.Response, error)
- func (c *Client) Down(name string, force bool) (*daemon.Response, error)
- func (c *Client) List() (*daemon.Response, error)
- func (c *Client) Ping() error
- func (c *Client) Status(name string, all bool) (*daemon.Response, error)
- func (c *Client) Up(name, configPath string) (*daemon.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDaemon ¶
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.
Click to show internal directories.
Click to hide internal directories.