Help us shape the future of Go! Take the 2026 Go Developer Survey

daemon

package
v0.239.0-rc.8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBinding = errors.New("the daemon binding is off or has neither a token nor TLS client certificates: enable daemon.binding in daemon.yaml with a token or a client-certificate TLS mode")

ErrNoBinding is the refusal to dial a daemon whose binding is off or cannot tell who a client is.

Functions

func EnsureRunning

func EnsureRunning(ctx context.Context, port int) error

EnsureRunning makes an infer daemon serve its binding on port, starting one in the background when nothing listens there. The daemon's own pid lock makes a redundant start exit, so callers never coordinate, and the wait covers a daemon already on its way. A daemon still shutting down holds that lock, so the start is retried until it is gone.

func FillBindingToken added in v0.239.0

func FillBindingToken(cfg *config.Config) error

FillBindingToken gives an enabled binding with neither a token nor client certificates this machine's local token, created on first use, so the daemon and its local clients agree on one without daemon.yaml.

func LocalDialConfig added in v0.239.0

func LocalDialConfig(ctx context.Context, cfg *config.Config, kind string) (agui.DialConfig, error)

LocalDialConfig is how a client of kind dials the daemon cfg describes: the binding's address and token, over TLS with this machine's client certificate when the binding serves one.

func LocalTokenFile added in v0.239.0

func LocalTokenFile() string

LocalTokenFile keeps the binding token this machine's daemon and its local clients share when daemon.yaml configures none.

Types

This section is empty.

Jump to

Keyboard shortcuts

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