daemon

package
v0.0.0-...-d2864de Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardCommandToLogger

func ForwardCommandToLogger(ctx context.Context, daemonName string, cmdStdout io.ReadCloser, cmdStderr io.ReadCloser)

func LaunchDaemons

func LaunchDaemons(ctx context.Context, launchers []Launcher, egrp *errgroup.Group) (pids []int, err error)

Types

type DaemonLauncher

type DaemonLauncher struct {
	DaemonName string
	Args       []string
	Uid        int
	Gid        int
	ExtraEnv   []string
}

func (DaemonLauncher) Launch

func (launcher DaemonLauncher) Launch(ctx context.Context) (context.Context, int, error)

func (DaemonLauncher) Name

func (launcher DaemonLauncher) Name() string

type Launcher

type Launcher interface {
	Name() string
	Launch(ctx context.Context) (context.Context, int, error)
}

Jump to

Keyboard shortcuts

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