daemon

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 47 Imported by: 0

Documentation

Overview

Package daemon wires the eventstore, state cache, registry, CLI socket, and observability into a single runnable gohomed.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	Commit    = "unknown"
	GoVersion = runtime.Version()
)

Version, Commit, and GoVersion are set via -ldflags at build time.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir             string
	LogLevel            slog.Level
	LogFormat           string // "auto" | "tty" | "json"
	AdminPort           int    // HTTP for /metrics and /health
	SocketPath          string // UNIX socket for CLI mutative ops
	SnapshotEveryEvents int
	SnapshotEveryPeriod time.Duration
	DriversTOMLPath     string // resolved against DataDir in Run; "@data/drivers.toml" is the sentinel
	CarportSocketDir    string // resolved against DataDir in Run; "@data/carport" is the sentinel
	ConfigDir           string // resolved against DataDir in Run; "@data/config" is the sentinel
}

func (*Config) WithDefaults

func (c *Config) WithDefaults()

type Daemon

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

func New

func New(cfg Config, logger *slog.Logger, metrics *observability.Metrics) *Daemon

New constructs an unstarted Daemon.

func (*Daemon) Run

func (d *Daemon) Run(ctx context.Context) error

Run boots through phases 1-5 and blocks until ctx is done.

Jump to

Keyboard shortcuts

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