daemon

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package daemon hosts the engine behind a unix-socket RPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBPath

func DBPath(dir string) string

func LogPath

func LogPath(dir string) string

func SocketPath

func SocketPath(dir string) string

func StateDir

func StateDir() (string, error)

StateDir resolves the daemon's state directory: $RUNTIMEPULSE_DIR if set, else ~/.runtimepulse.

Types

type Daemon

type Daemon struct {
	Dir      string
	Engine   *engine.Engine
	Watches  *watch.Manager
	Dispatch *dispatch.Dispatcher
	// contains filtered or unexported fields
}

func New

func New(dir string) (*Daemon, error)

func (*Daemon) Close

func (d *Daemon) Close()

func (*Daemon) Serve

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

Serve accepts connections until ctx is cancelled.

func (*Daemon) ServeWS

func (d *Daemon) ServeWS(ctx context.Context, port int) (string, error)

ServeWS starts the optional WebSocket event stream (spec §9: opt-in, loopback-only, token-gated). The token persists in <dir>/ws-token (0600) so external consumers can read it across daemon restarts.

Jump to

Keyboard shortcuts

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