daemon

package
v0.0.0-...-9957a5b Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package daemon provides the main orchestration for the provisioning daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App encapsulate commands and options of the daemon, which can be controlled by env variables and config files.

func New

func New() *App

New registers commands and return a new App.

func (App) Hup

func (a App) Hup() (shouldQuit bool)

Hup prints all goroutine stack traces and return false to signal you shouldn't quit.

func (*App) Quit

func (a *App) Quit()

Quit gracefully shutdown the service.

func (App) RootCmd

func (a App) RootCmd() cobra.Command

RootCmd returns a copy of the root command for the app. Shouldn't be in general necessary apart when running generators.

func (*App) Run

func (a *App) Run() error

Run executes the command and associated process. It returns an error on syntax/usage error.

func (App) UsageError

func (a App) UsageError() bool

UsageError returns if the error is a command parsing or runtime one.

func (*App) WaitReady

func (a *App) WaitReady()

WaitReady signals when the daemon is ready Note: we need to use a pointer to not copy the App object before the daemon is ready, and thus, creates a data race.

Jump to

Keyboard shortcuts

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