daemon

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("service unavailable; ownership held but control endpoint is unreachable")

Functions

func DescriptorPath

func DescriptorPath(dir string) string

func LifecyclePath

func LifecyclePath(dir string) string

func LogPath

func LogPath(dir string) string

func OpenLog

func OpenLog(dir string) (io.WriteCloser, error)

func OwnershipPath

func OwnershipPath(dir string) string

func PublishDescriptor

func PublishDescriptor(dir string, d Descriptor) error

func RemoveDescriptor

func RemoveDescriptor(dir, instanceID string) error

func Run

func Run(ctx context.Context, settings Settings, runtimeDir string, initial *ingestion.Request, ready func(Status, *contextservice.Submission)) error

func RunForeground

func RunForeground(ctx context.Context, settings Settings, input ingestion.Request, confirm func(Status) (bool, error), ready func(Status, *contextservice.Submission)) error

RunForeground serializes discovery, replacement and publication. Shutdown uses the authenticated control endpoint, never an unverified operating-system PID.

func RuntimeDir

func RuntimeDir() (string, error)

Types

type Client

type Client struct {
	RuntimeDirectory string
}

func NewClient

func NewClient() (*Client, error)

func (*Client) Status

func (client *Client) Status(ctx context.Context) (Status, error)

func (*Client) Stop

func (client *Client) Stop(ctx context.Context) error

type Descriptor

type Descriptor struct {
	Endpoint string `json:"endpoint"`
	Token    string `json:"token"`
	Status   Status `json:"status"`
}

func ReadDescriptor

func ReadDescriptor(dir string) (Descriptor, error)

type Settings

type Settings = controlapi.Settings

type Status

type Status = controlapi.Status

Jump to

Keyboard shortcuts

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