Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusStart = iota StatusExit StatusRunning StatusError )
View Source
const ( EnvDaemonName = "EO_DAEMON_IDX" EnvDaemonPath = "EO_DAEMON_PATH" )
Variables ¶
View Source
var (
ErrorProcessHandlerConflict = errors.New("process handler name conflict")
)
Functions ¶
Types ¶
type IConfigBuild ¶ added in v0.5.0
type IConfigBuild interface {
Config() StartArgs
}
type IProcessUpdate ¶ added in v0.5.0
type IProcessUpdates ¶ added in v0.5.0
type IProcessUpdates []IProcessUpdate
func (IProcessUpdates) Update ¶ added in v0.5.0
func (I IProcessUpdates) Update(cmd *exec.Cmd)
type ProcessCmd ¶ added in v0.5.0
type ProcessCmd struct {
// contains filtered or unexported fields
}
func NewProcessCmd ¶ added in v0.5.0
func (*ProcessCmd) Close ¶ added in v0.5.0
func (p *ProcessCmd) Close() error
func (*ProcessCmd) Cmd ¶ added in v0.5.0
func (p *ProcessCmd) Cmd() *exec.Cmd
func (*ProcessCmd) Pid ¶ added in v0.5.0
func (p *ProcessCmd) Pid() int
func (*ProcessCmd) Read ¶ added in v0.5.0
func (p *ProcessCmd) Read()
func (*ProcessCmd) Status ¶ added in v0.5.0
func (p *ProcessCmd) Status() int
func (*ProcessCmd) Wait ¶ added in v0.5.0
func (p *ProcessCmd) Wait() error
type ProcessController ¶ added in v0.5.0
type ProcessController struct {
// contains filtered or unexported fields
}
func NewProcessController ¶ added in v0.5.0
func NewProcessController(ctx context.Context, name string, logWriter io.Writer, callback ...IProcessUpdate) *ProcessController
func (*ProcessController) Shutdown ¶ added in v0.5.0
func (pc *ProcessController) Shutdown()
func (*ProcessController) Start ¶ added in v0.5.0
func (pc *ProcessController) Start(configData []byte, extraFiles []*os.File) error
func (*ProcessController) Stop ¶ added in v0.5.0
func (pc *ProcessController) Stop()
func (*ProcessController) TryRestart ¶ added in v0.5.0
func (pc *ProcessController) TryRestart(configData []byte, extraFiles []*os.File)
Click to show internal directories.
Click to hide internal directories.