Documentation
¶
Index ¶
- func Fields(src string) (out []string)
- func Rotate(options LoggerOptions) io.WriteCloser
- func Terminate(pid int, done <-chan struct{})
- func WrapClose(closers ...io.Closer) func()
- type Cmd
- func (c *Cmd) LineRead(lineRd func(flag, line string), transformers ...func(io.Reader) io.Reader) *Cmd
- func (c *Cmd) Logger(options LoggerOptions) *Cmd
- func (c *Cmd) LoggerWriter(w io.WriteCloser) *Cmd
- func (c *Cmd) PidFile(pidfile string) *Cmd
- func (c *Cmd) PostStart(task func(c *Cmd), parallel ...bool) *Cmd
- func (c *Cmd) PreExit(task func(c *Cmd), parallel ...bool) *Cmd
- func (c *Cmd) Run() (state *StartState)
- func (c *Cmd) RunWithContext(ctx context.Context) (state *StartState)
- func (c *Cmd) Standard() *Cmd
- func (c *Cmd) Stderr(w io.WriteCloser) *Cmd
- func (c *Cmd) Stdout(w io.WriteCloser) *Cmd
- func (c *Cmd) String() string
- func (c *Cmd) With(options ...Option) *Cmd
- type FOption
- type FOptionEx
- type FileSize
- func (s FileSize) MarshalJSON() ([]byte, error)
- func (s FileSize) MarshalYAML() (any, error)
- func (s *FileSize) SetString(in string) error
- func (s FileSize) String() string
- func (s FileSize) ToB() string
- func (s FileSize) ToIB() string
- func (s *FileSize) UnmarshalJSON(data []byte) error
- func (s *FileSize) UnmarshalYAML(unmarshal func(any) error) error
- type LoggerOptions
- type Option
- type Options
- type Pid
- type Runner
- type StartState
- type Status
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rotate ¶ added in v0.3.0
func Rotate(options LoggerOptions) io.WriteCloser
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
func (*Cmd) Logger ¶ added in v0.4.0
func (c *Cmd) Logger(options LoggerOptions) *Cmd
func (*Cmd) LoggerWriter ¶ added in v0.4.0
func (c *Cmd) LoggerWriter(w io.WriteCloser) *Cmd
func (*Cmd) Run ¶ added in v0.3.0
func (c *Cmd) Run() (state *StartState)
func (*Cmd) RunWithContext ¶ added in v0.3.0
func (c *Cmd) RunWithContext(ctx context.Context) (state *StartState)
启动进程
type FileSize ¶ added in v0.3.0
type FileSize float64
func (FileSize) MarshalJSON ¶ added in v0.3.0
func (FileSize) MarshalYAML ¶ added in v0.3.0
func (*FileSize) UnmarshalJSON ¶ added in v0.3.0
type LoggerOptions ¶ added in v0.4.0
type StartState ¶ added in v0.2.0
type StartState struct { PID int Err error Status Status // contains filtered or unexported fields }
func (*StartState) Cancel ¶ added in v0.2.0
func (s *StartState) Cancel()
func (*StartState) Done ¶ added in v0.2.0
func (s *StartState) Done() <-chan struct{}
func (*StartState) Wait ¶ added in v0.2.0
func (s *StartState) Wait() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.