client

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package client provides client application lifecycle manager for the client part of the CLI.

Index

Constants

This section is empty.

Variables

View Source
var NewClientID = func() string {
	return uuid.NewSHA1(uuid.NameSpaceDNS, []byte(hostname())).String()
}

Functions

This section is empty.

Types

type Client

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

Client is the main orchestrator and client of the application.

func New

func New(address string, options ...Option) *Client

New creates and returns a new client.

func (*Client) Run

func (c *Client) Run(ctx context.Context, cmd command.Command) (exitCode int, err error)

Run the command and output the results.

type Option

type Option func(*Client)

func WithClientID

func WithClientID(id string) Option

WithClientID sets ID for the client.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger configures the client with the given logger.

func WithStderrBuffer

func WithStderrBuffer(buffer bool) Option

WithStderrBuffer sets the client to buffer output on stderr and output it when the command has finished.

func WithWorkspaceRoot

func WithWorkspaceRoot(root string) Option

WithWorkspaceRoot sets the workspace root for the client.

Jump to

Keyboard shortcuts

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