Documentation ¶
Index ¶
- type Chief
- func (c *Chief) AddProcess(name string, sp SetProc) (*ProcStatus, error)
- func (c *Chief) AllProcesses() []ProcStatus
- func (c *Chief) DeleteProcess(name string) error
- func (c *Chief) Get(name string) (*ProcStatus, error)
- func (c *Chief) GetProcess(name string) (*ProcStatus, error)
- func (c *Chief) LoggerSignal(name string, signal int32) error
- func (c *Chief) ProcessSignal(name string, signal int32) error
- func (c *Chief) StopAll()
- func (c *Chief) StopProcess(name string) error
- func (c *Chief) UpdateProcess(name string, sp SetProc) (*ProcStatus, error)
- type ControlServer
- func (cs *ControlServer) AddProcess(ctx context.Context, pSet *pb.SetProc) (*pb.ProcStatus, error)
- func (cs *ControlServer) AllProcesses(context.Context, *pb.Nope) (*pb.ProcessesStatus, error)
- func (cs *ControlServer) DeleteProcess(ctx context.Context, name *pb.ProcName) (*pb.Result, error)
- func (cs *ControlServer) GetProcess(ctx context.Context, pn *pb.ProcName) (*pb.ProcStatus, error)
- func (cs *ControlServer) Halt(context.Context, *pb.Nope) (*pb.Result, error)
- func (cs *ControlServer) LoggerSignal(ctx context.Context, svcSig *pb.Signal) (*pb.Result, error)
- func (cs *ControlServer) ProcessSignal(ctx context.Context, svcSig *pb.Signal) (*pb.Result, error)
- func (cs *ControlServer) Start(ctx context.Context) error
- func (cs *ControlServer) Stop(ctx context.Context)
- func (cs *ControlServer) UpdateProcess(ctx context.Context, pSet *pb.SetProc) (*pb.ProcStatus, error)
- type ProcOption
- type ProcStatus
- type Process
- type SetProc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chief ¶
type Chief struct {
// contains filtered or unexported fields
}
Chief is the chief of all managed processes.
func (*Chief) AddProcess ¶
func (c *Chief) AddProcess(name string, sp SetProc) (*ProcStatus, error)
func (*Chief) AllProcesses ¶
func (c *Chief) AllProcesses() []ProcStatus
func (*Chief) DeleteProcess ¶
TODO: refactor Stop and Delete commands
func (*Chief) GetProcess ¶
func (c *Chief) GetProcess(name string) (*ProcStatus, error)
func (*Chief) StopProcess ¶
func (*Chief) UpdateProcess ¶
func (c *Chief) UpdateProcess(name string, sp SetProc) (*ProcStatus, error)
type ControlServer ¶
type ControlServer struct {
// contains filtered or unexported fields
}
func NewControlServer ¶
func NewControlServer(chief *Chief) *ControlServer
func (*ControlServer) AddProcess ¶
func (cs *ControlServer) AddProcess(ctx context.Context, pSet *pb.SetProc) (*pb.ProcStatus, error)
func (*ControlServer) AllProcesses ¶
func (cs *ControlServer) AllProcesses(context.Context, *pb.Nope) (*pb.ProcessesStatus, error)
AllProcesses returns all registered processes.
func (*ControlServer) DeleteProcess ¶
DeleteService stops and removes process by name.
func (*ControlServer) GetProcess ¶
func (cs *ControlServer) GetProcess(ctx context.Context, pn *pb.ProcName) (*pb.ProcStatus, error)
GetProcess returns process status description by name.
func (*ControlServer) LoggerSignal ¶
func (*ControlServer) ProcessSignal ¶
func (*ControlServer) Stop ¶
func (cs *ControlServer) Stop(ctx context.Context)
func (*ControlServer) UpdateProcess ¶
func (cs *ControlServer) UpdateProcess(ctx context.Context, pSet *pb.SetProc) (*pb.ProcStatus, error)
type ProcOption ¶
type ProcOption func(*processCfg)
func Env ¶
func Env(s string) ProcOption
func WorkDir ¶
func WorkDir(s string) ProcOption
type ProcStatus ¶
type ProcStatus = pb.ProcStatus
type SetProc ¶
func NewProcess ¶
func NewProcess(name string, commandLine string, opts ...ProcOption) SetProc
Click to show internal directories.
Click to hide internal directories.