Documentation ¶
Index ¶
- func Arch() string
- func Args() (args []string)
- func Dir() string
- func Executable() string
- func Go(fn func())
- func GoGroup(n int, fn func())
- func GoGroupWithLog(n int, log *ulog.Log, fn func())
- func LoadConf[Conf any](filename string) Conf
- func Name() string
- func OS() string
- func ParseCmdLine(version string) (confFile string, ok bool)
- func Pid() int
- func Pwd() string
- func Run[UserConf any](version string, fn func(UserConf))
- func RunJust(version string, opts ulog.Options, fn func())
- func RunPre[UserConf any](version string, pre func() bool, fn func(UserConf))
- func WaitFor(log *ulog.Log, fn func() bool, timeout time.Duration) time.Duration
- func WaitInterrupt()
- func Waited(ts time.Time) time.Duration
- type Conf
- type GoSwarm
- type GoSwarmLimit
- type Job
- func (o *Job) Cancel()
- func (o *Job) Do() bool
- func (o *Job) Loop(fn func())
- func (o *Job) OnFinish(fn func()) *Job
- func (o *Job) OnInit(fn func() error) *Job
- func (o *Job) OnNotRun(fn func()) *Job
- func (o *Job) OnStart(fn func()) *Job
- func (o *Job) Run(fn func())
- func (o *Job) Running() bool
- func (o *Job) Sleep(timeout time.Duration)
- func (o *Job) Stop()
- func (o *Job) Tick(fn func(), interval time.Duration)
- func (o *Job) Wait()
- func (o *Job) WithLog(log *ulog.Log) *Job
- func (o *Job) WithLogLevel(level ulog.Level) *Job
- type Tick
- type Wait
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Executable ¶
func Executable() string
func GoGroupWithLog ¶ added in v0.2.84
func ParseCmdLine ¶
func WaitInterrupt ¶ added in v0.1.51
func WaitInterrupt()
Types ¶
type Conf ¶
type GoSwarm ¶ added in v0.2.4
type GoSwarm struct {
// contains filtered or unexported fields
}
func NewGoSwarm ¶ added in v0.2.4
func NewGoSwarm() *GoSwarm
type GoSwarmLimit ¶ added in v0.2.84
type GoSwarmLimit struct {
// contains filtered or unexported fields
}
func NewGoSwarmLimit ¶ added in v0.2.84
func NewGoSwarmLimit() *GoSwarmLimit
func (*GoSwarmLimit) Add ¶ added in v0.2.84
func (o *GoSwarmLimit) Add(fn func()) *GoSwarmLimit
func (*GoSwarmLimit) Execute ¶ added in v0.2.84
func (o *GoSwarmLimit) Execute(limit int)
func (*GoSwarmLimit) WithLog ¶ added in v0.2.84
func (o *GoSwarmLimit) WithLog(log *ulog.Log) *GoSwarmLimit
type Tick ¶ added in v0.7.0
type Tick struct {
// contains filtered or unexported fields
}
func (*Tick) LastDuration ¶ added in v0.7.0
func (*Tick) WithEnable ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.