app

package
v0.2.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: MIT Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arch

func Arch() string

func Args added in v0.1.25

func Args() (args []string)

func Dir

func Dir() string

func Executable

func Executable() string

func Go

func Go(fn func())

func GoGroup added in v0.1.56

func GoGroup(n int, fn func())

func LoadConf

func LoadConf[Conf any](filename string) Conf

func Name

func Name() string

func OS

func OS() string

func ParseCmdLine

func ParseCmdLine(version string) (confFile string, ok bool)

func Pid

func Pid() int

func Run

func Run[UserConf any](version string, fn func(UserConf))

func RunJust added in v0.1.24

func RunJust(version string, opts ulog.Options, fn func())

func WaitInterrupt added in v0.1.51

func WaitInterrupt()

Types

type Conf

type Conf struct {
	LogLevel    string
	LogDir      string
	LogFile     string
	LogConsole  bool
	LogGoID     bool
	LogFileSize string
}

func (*Conf) Log

func (o *Conf) Log() ulog.Options

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

func (*GoSwarm) Add added in v0.2.4

func (o *GoSwarm) Add(fn func())

func (*GoSwarm) Wait added in v0.2.4

func (o *GoSwarm) Wait()

func (*GoSwarm) WithLog added in v0.2.4

func (o *GoSwarm) WithLog(log *ulog.Log) *GoSwarm

type Job added in v0.2.2

type Job struct {
	// contains filtered or unexported fields
}

func NewJob added in v0.2.2

func NewJob() *Job

func (*Job) Cancel added in v0.2.2

func (o *Job) Cancel()

func (*Job) Do added in v0.2.2

func (o *Job) Do() bool

func (*Job) OnFinish added in v0.2.2

func (o *Job) OnFinish(fn func()) *Job

func (*Job) OnInit added in v0.2.2

func (o *Job) OnInit(fn func() error) *Job

func (*Job) OnStart added in v0.2.2

func (o *Job) OnStart(fn func()) *Job

func (*Job) Run added in v0.2.2

func (o *Job) Run(fn func())

func (*Job) RunLoop added in v0.2.2

func (o *Job) RunLoop(fn func())

func (*Job) RunTicks added in v0.2.2

func (o *Job) RunTicks(fn func(), interval time.Duration)

func (*Job) Sleep added in v0.2.2

func (o *Job) Sleep(timeout time.Duration)

func (*Job) Stop added in v0.2.2

func (o *Job) Stop()

func (*Job) Wait added in v0.2.2

func (o *Job) Wait()

func (*Job) WithLog added in v0.2.2

func (o *Job) WithLog(log *ulog.Log) *Job

func (*Job) WithLogLevel added in v0.2.2

func (o *Job) WithLogLevel(level ulog.Level) *Job

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL