Documentation ¶
Index ¶
- Constants
- Variables
- func StopStatus(status Status) bool
- func WorkStatus(status Status) bool
- type IServ
- type Serv
- func (serv *Serv) Conf() *viper.Viper
- func (serv *Serv) DoWithLock(f func() (interface{}, error), rLock bool) (interface{}, error)
- func (serv *Serv) DoWithLockOnWorkStatus(f func() (interface{}, error), rLock bool, mustWorking bool) (interface{}, error)
- func (serv *Serv) Info() (result sth.Result)
- func (serv *Serv) Message() messagebus.MessageBus
- func (serv *Serv) OnStart(ctx context.Context) (err error)
- func (serv *Serv) OnStop(ctx context.Context) (err error)
- func (serv *Serv) PID() int
- func (serv *Serv) Process() *process.Process
- func (serv *Serv) SetStatus(newStatus Status) (oldStatus Status, err error)
- func (serv *Serv) Status() Status
- func (serv *Serv) Toggle(pauseOrResume bool) (sth.Result, error)
- type Status
- type StatusConflictError
- type StatusError
Constants ¶
View Source
const (
ServStatusChanged string = "ServStatusChanged"
)
Topics
Variables ¶
View Source
var StatusMap = map[string]Status{ utils.Text(Init): Init, utils.Text(Preparing): Preparing, utils.Text(Working): Working, utils.Text(Paused): Paused, utils.Text(Stopping): Stopping, utils.Text(Stopped): Stopped, }
StatusMap TODO
Functions ¶
Types ¶
type Serv ¶
Serv TODO
func (*Serv) DoWithLock ¶
DoWithLock TODO
func (*Serv) DoWithLockOnWorkStatus ¶
func (serv *Serv) DoWithLockOnWorkStatus(f func() (interface{}, error), rLock bool, mustWorking bool) (interface{}, error)
DoWithLockOnWorkStatus TODO
func (*Serv) Message ¶ added in v0.2.0
func (serv *Serv) Message() messagebus.MessageBus
Message TODO
type Status ¶
type Status int
Status type
const ( Init Status // init Preparing // preparing Working // working Paused // paused Stopping // stopping Stopped // stopped Cleaning // Cleaning )
Status enum
func (*Status) UnmarshalJSON ¶
UnmarshalJSON unmashals a quoted json string to the enum value
type StatusConflictError ¶ added in v0.1.6
type StatusConflictError struct {
// contains filtered or unexported fields
}
StatusConflictError TODO
func (*StatusConflictError) Error ¶ added in v0.1.6
func (e *StatusConflictError) Error() string
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
StatusError TODO
func (*StatusError) Error ¶
func (e *StatusError) Error() string
Click to show internal directories.
Click to hide internal directories.