client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package client is the CLI-side RPC client for the daemon socket.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Socket string
}

func EnsureDaemon

func EnsureDaemon(dir, socket string) (*Client, error)

EnsureDaemon returns a client for the daemon at dir, starting the daemon (detached, logging to daemon.log) if it is not running.

func New

func New(socket string) *Client

func (*Client) Call

func (c *Client) Call(method string, params, out any) error

Call dials, sends one request, decodes one response into out (out may be nil).

func (*Client) Follow

func (c *Client) Follow(ctx context.Context, fn func(core.Event)) error

Follow streams events to fn until ctx is cancelled or the daemon closes. Bus semantics: a slow consumer may miss events (no gap signal); reconcile via events.list if completeness matters.

Jump to

Keyboard shortcuts

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