cmdDaemon

package module
v0.0.0-...-ff4a37b Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: GPL-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CmdDaemon       = "daemon"
	CmdDaemonExec   = "exec"
	CmdDaemonStop   = "kill"
	CmdDaemonReload = "reload"
	CmdDaemonList   = "list"
)
View Source
const Group = "Daemon"

Variables

View Source
var (
	AliasesDaemonExec   = []string{"run"}
	AliasesDaemonStop   = []string{"stop"}
	AliasesDaemonReload = []string{"hup"}
	AliasesDaemonList   = []string{"ls"}
)

Functions

func DaemonizeClose

func DaemonizeClose(cntxt *daemon.Context) error

func DummyFunc

func DummyFunc(_ *cobra.Command, _ []string) error

Types

type Daemon

type Daemon struct {
	Error error

	SelfCmd *cobra.Command
	// contains filtered or unexported fields
}

func New

func New() *Daemon

func (*Daemon) AttachCommands

func (d *Daemon) AttachCommands(cmd *cobra.Command) *cobra.Command

func (*Daemon) CmdDaemon

func (d *Daemon) CmdDaemon(cmd *cobra.Command, _ []string) error

func (*Daemon) CmdDaemonExec

func (d *Daemon) CmdDaemonExec(fn DaemonFunc, _ *cobra.Command, args []string) error

func (*Daemon) CmdDaemonKill

func (d *Daemon) CmdDaemonKill() error

func (*Daemon) CmdDaemonList

func (d *Daemon) CmdDaemonList() error

func (*Daemon) CmdDaemonReload

func (d *Daemon) CmdDaemonReload() error

func (*Daemon) GetCmd

func (d *Daemon) GetCmd() *cobra.Command

func (*Daemon) InitArgs

func (d *Daemon) InitArgs(_ *cobra.Command, _ []string) error

func (*Daemon) ReadPid

func (d *Daemon) ReadPid() int

func (*Daemon) WritePid

func (d *Daemon) WritePid(pid int) error

type DaemonFunc

type DaemonFunc func(cmd *cobra.Command, args []string) error

Jump to

Keyboard shortcuts

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