Documentation
¶
Index ¶
- Variables
- type Manager
- type NodeMeta
- type Ping
- type PingItem
- type PingItems
- type T
- func (t *T) IsRunning() (bool, error)
- func (t *T) LoadManager(ctx context.Context) error
- func (t *T) Restart(ctx context.Context, profile string) error
- func (t *T) Run(ctx context.Context, profile string) error
- func (t *T) SetNode(node string)
- func (t *T) Start(ctx context.Context, profile string) error
- func (t *T) Stop(ctx context.Context) error
- func (t *T) StopWithoutManager() error
- func (t *T) WaitRunning() error
Constants ¶
This section is empty.
Variables ¶
var ( WaitRunningTimeout = 20 * time.Second WaitRunningDelay = 500 * time.Millisecond WaitStoppedTimeout = 4 * time.Second WaitStoppedDelay = 250 * time.Millisecond ErrAlreadyRunning = errors.New("daemon already running") )
Functions ¶
This section is empty.
Types ¶
type Ping ¶
func (Ping) Unstructured ¶
type PingItem ¶
func (PingItem) Unstructured ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) IsRunning ¶
IsRunning function detect daemon status using api
it returns true is daemon is running, else false
func (*T) Restart ¶
Restart handle daemon restart from command origin.
It is used to forward restart control to (systemd) manager (when the origin is not systemd)
func (*T) Start ¶
Start handle daemon start from command origin.
It is used to forward start control to (systemd) manager (when the origin is not systemd)
func (*T) Stop ¶
Stop handle daemon stop from command origin.
It is used to forward stop control to (systemd) manager (when the origin is not systemd)
func (*T) StopWithoutManager ¶
StopWithoutManager function will stop daemon with internal lock protection
func (*T) WaitRunning ¶
WaitRunning function waits for daemon running
It needs to be called from a cli lock protection