Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeReplace = "replace" TypeSymlink = "symlink" TypeUnlink = "unlink" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon interface { // Configure configures the daemon. Configure(*api.NodeConfig) error // EnsureRunning ensures that the daemon is running by either // starting/restarting the daemon, then blocking until the status of the // daemon reflects that it is running. // * If the daemon is not running, it will be started. // * If the daemon is already running, and has been re-configured, it will be restarted. EnsureRunning() error // PostLaunch runs any additional step that needs to occur after the service // daemon as been started PostLaunch(*api.NodeConfig) error // Name returns the name of the daemon. Name() string }
type DaemonManager ¶
type DaemonManager interface { // StartDaemon starts the daemon with the given name. // If the daemon is already running, this is a no-op. StartDaemon(name string) error // StopDaemon stops the daemon with the given name. // If the daemon is not running, this is a no-op. StopDaemon(name string) error // RestartDaemon restarts the daemon with the given name. // If the daemon is not running, it will be started. RestartDaemon(name string) error // GetDaemonStatus returns the status of the daemon with the given name. GetDaemonStatus(name string) (DaemonStatus, error) // EnableDaemon enables the daemon with the given name. // If the daemon is already enabled, this is a no-op. EnableDaemon(name string) error // DisableDaemon disables the daemon with the given name. // If the daemon is not enabled, this is a no-op. DisableDaemon(name string) error // Close cleans up any underlying resources used by the daemon manager. Close() }
func NewDaemonManager ¶
func NewDaemonManager() (DaemonManager, error)
type DaemonStatus ¶
type DaemonStatus string
const ( DaemonStatusRunning DaemonStatus = "running" DaemonStatusStopped DaemonStatus = "stopped" DaemonStatusUnknown DaemonStatus = "unknown" )
Click to show internal directories.
Click to hide internal directories.