daemon

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package daemon runs Ripen on a schedule. It owns its process and writes nothing to stdout: the Event stream on stderr is its entire output, which is what lets a container's logs be parsed as a stream of Events and nothing else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

Run drives the loop until the context ends, or once when Once is set. A failed cycle is not a failed daemon: the engine has already put a run.failed Event on the stream, and the next cycle tries again.

Types

type Engine

type Engine interface {
	Schedule(context.Context, domain.Mode, time.Duration) error
	RunContext(context.Context, domain.Mode) (updater.Report, error)
}

Engine coordinates scheduled and finite runs.

type Options

type Options struct {
	Updater  Engine
	Mode     domain.Mode
	Interval time.Duration
	// Once runs a single cycle and returns its error. Nothing sleeps.
	Once bool
}

Options configures a daemon loop.

Jump to

Keyboard shortcuts

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