client

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultTimeout = 30 * time.Second

DefaultTimeout bounds a single Send (write request + read response). It is generous enough for the slowest handler — `stop` waits out the process termination grace period before replying — while still turning a wedged daemon into a prompt error instead of a command that hangs forever.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a connection to the devrun daemon.

func Connect

func Connect(socketPath string) (*Client, error)

Connect opens a Unix socket connection to the daemon.

func (*Client) Close

func (c *Client) Close() error

Close closes the connection.

func (*Client) Conn

func (c *Client) Conn() net.Conn

Conn returns the underlying connection (used during attach for raw byte streaming).

func (*Client) Send

func (c *Client) Send(reqType string, payload interface{}) (*ipc.Response, error)

Send sends a typed request and reads a single JSON response.

func (*Client) SetTimeout

func (c *Client) SetTimeout(d time.Duration)

SetTimeout overrides the per-Send deadline. A non-positive value disables it (use this before switching to raw streaming via Conn).

Jump to

Keyboard shortcuts

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