daemonclient

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 8 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

Overview

Package daemonclient connects to the stagent daemon, starting it on demand.

Index

Constants

View Source
const EnvExe = "STAGENT_EXE"

EnvExe overrides the stagent executable used to auto-start the daemon or detached holders. Tests set it to a built binary (os.Executable would be the test binary).

Variables

This section is empty.

Functions

func Dial

func Dial(l *paths.Layout, timeout time.Duration) (net.Conn, error)

Dial connects to a running daemon without starting one.

func DialOrStart

func DialOrStart(l *paths.Layout, wait time.Duration) (net.Conn, error)

DialOrStart connects to the daemon, starting it detached if nothing answers, and waits up to wait for it to come up. An address another user owns (*paths.OwnerError) is reported as is: no daemon of ours could serve it. The same holds for a run directory of theirs, which StartDaemon's EnsureDirs reports before anything is started.

func Exe

func Exe() (string, error)

Exe returns the stagent executable to launch helper processes with.

func StartDaemon

func StartDaemon(l *paths.Layout) error

StartDaemon launches `stagent daemon` detached. A second concurrent start is harmless: the loser fails to take the IPC address and exits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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