daemonhost

package
v0.182.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package daemonhost composes the native daemon's listeners, queue and mounted services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Runtime      daemonruntime.Dependencies
	Listen       func(string, string) (net.Listener, error)
	Tuning       *Tuning
	FleetOptions func(string, string, string, wbconfig.CockpitConfig, io.Writer, func() (string, error)) cockpitfleet.Options
}

Dependencies supplies the actual runtime and fleet composition. FleetOptions is required and must construct the requested machine's real collectors.

type Host

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

func New

func New(deps Dependencies) *Host

func (*Host) Serve

func (host *Host) Serve(ctx context.Context, r Request, out, errOut io.Writer) error

type Request

type Request struct {
	ProjectsRoot, Listen, LifecycleState string
	Quiet, ManagedStart                  bool
}

Request is one current invocation of the native host.

type Tuning

type Tuning struct {
	APIBaseURL   string
	PollInterval time.Duration
	// RedeliverySweepInterval overrides the missed-webhook recovery sweep's
	// hourly interval, the same way PollInterval overrides the poller's.
	RedeliverySweepInterval time.Duration
	// Now overrides the sweep's clock so a test can drive the 72-hour and
	// 7-day windows without waiting on them.
	Now func() time.Time
}

Tuning overrides the two values a whole-journey end-to-end test cannot live with: GitHub's origin, which a test replaces with a fake server, and the poll interval, whose 30s configuration floor is far longer than a test may run. Nothing outside a test sets it; production passes nil.

Jump to

Keyboard shortcuts

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