daemondefs

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package daemondefs contains definitions used for the daemon.

It is a separate package so that packages that only depend on the daemon API does not need to depend on the concrete implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateFunc

type ActivateFunc func(stderr io.Writer, spawnCfg *SpawnConfig) (Client, error)

ActivateFunc is a function that activates a daemon client, possibly by spawning a new daemon and connecting to it.

type Client

type Client interface {
	storedefs.Store

	ResetConn() error
	Close() error

	Pid() (int, error)
	SockPath() string
	Version() (int, error)
}

Client represents a daemon client.

type SpawnConfig

type SpawnConfig struct {
	// DbPath is the path to the database.
	DbPath string
	// SockPath is the path to the socket on which the daemon will serve
	// requests.
	SockPath string
	// RunDir is the directory in which to place the daemon log file.
	RunDir string
}

SpawnConfig keeps configurations for spawning the daemon.

Jump to

Keyboard shortcuts

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