daemonrun

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: GPL-3.0 Imports: 34 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 daemonrun owns construction and bounded shutdown of the daemon runtime. Command packages provide paths, streams, and version metadata but do not assemble domain objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, options Options) error

Run constructs the production daemon, runs it until cancellation or a worker failure, and joins every owned resource before returning.

Types

type Error

type Error struct {
	Kind    ErrorKind
	Message string
	Err     error
}

Error carries a redacted user-facing message and retains the underlying failure for diagnostics and cancellation classification.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorKind

type ErrorKind uint8

ErrorKind identifies the stable command-level outcome of a daemon startup failure without making callers inspect rendered error text.

const (
	ErrorInvalidInput ErrorKind = iota + 1
	ErrorOperational
	ErrorPartial
)

type Options

type Options struct {
	Version    string
	ConfigPath string
	SocketPath string
	LogPath    string
	Stderr     io.Writer
}

Options contains the complete command-owned inputs to a daemon runtime.

Jump to

Keyboard shortcuts

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