Documentation
¶
Index ¶
- func Init(r Runner) error
- func Start(r Runner)
- func StartBG(r Runner)
- func Stop(r Runner)
- type BaseRunner
- func (br *BaseRunner) AppendError(err ...error)
- func (br *BaseRunner) AppendRunner(r Runner) bool
- func (br *BaseRunner) BoolValue(k string) bool
- func (br *BaseRunner) Children() []Runner
- func (br *BaseRunner) ChildrenError() error
- func (br *BaseRunner) Collect() map[string]string
- func (br *BaseRunner) CollectF(f func(map[string]string))
- func (br *BaseRunner) Ctx() context.Context
- func (br *BaseRunner) Debug(msg string, kvs ...any)
- func (br *BaseRunner) DelKey(k string)
- func (br *BaseRunner) Done() <-chan struct{}
- func (br *BaseRunner) Err(msg string, err error, kvs ...any)
- func (br *BaseRunner) Error() error
- func (br *BaseRunner) FloatValue(k string) float64
- func (br *BaseRunner) FloatValueOr(k string, d float64) float64
- func (br *BaseRunner) GetChild(name string) Runner
- func (br *BaseRunner) HasKey(k string) bool
- func (br *BaseRunner) Info(msg string, kvs ...any)
- func (br *BaseRunner) Init() error
- func (br *BaseRunner) Int64Value(k string) int64
- func (br *BaseRunner) Int64ValueOr(k string, d int64) int64
- func (br *BaseRunner) IntValue(k string) int
- func (br *BaseRunner) IntValueOr(k string, d int) int
- func (br *BaseRunner) Logger() *zap.Logger
- func (br *BaseRunner) Name() string
- func (br *BaseRunner) OnChildDone(_ Runner) error
- func (br *BaseRunner) Parent() Runner
- func (br *BaseRunner) SelfError() error
- func (br *BaseRunner) SetCtx(ctx context.Context)
- func (br *BaseRunner) SetName(n string)
- func (br *BaseRunner) SetParent(r Runner)
- func (br *BaseRunner) Start() error
- func (br *BaseRunner) Started() <-chan struct{}
- func (br *BaseRunner) Stop() error
- func (br *BaseRunner) StopDone() <-chan struct{}
- func (br *BaseRunner) Stopping() <-chan struct{}
- func (br *BaseRunner) Store(k string, v any)
- func (br *BaseRunner) StoreValues(m map[string]string)
- func (br *BaseRunner) StringValue(k string) string
- func (br *BaseRunner) StringValueOr(k string, d string) string
- func (br *BaseRunner) ValueTo(k string, to any) error
- func (br *BaseRunner) WaitChildrenDone()
- func (br *BaseRunner) Warn(msg string, kvs ...any)
- func (br *BaseRunner) WithLogger(l *zap.Logger, kvs ...any)
- func (br *BaseRunner) WithLoggerNoName(l *zap.Logger, kvs ...any)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRunner ¶
type BaseRunner struct {
// contains filtered or unexported fields
}
func NewBase ¶
func NewBase(name string) *BaseRunner
func (*BaseRunner) AppendError ¶
func (br *BaseRunner) AppendError(err ...error)
func (*BaseRunner) AppendRunner ¶
func (br *BaseRunner) AppendRunner(r Runner) bool
func (*BaseRunner) BoolValue ¶
func (br *BaseRunner) BoolValue(k string) bool
func (*BaseRunner) Children ¶
func (br *BaseRunner) Children() []Runner
func (*BaseRunner) ChildrenError ¶
func (br *BaseRunner) ChildrenError() error
func (*BaseRunner) Collect ¶
func (br *BaseRunner) Collect() map[string]string
func (*BaseRunner) CollectF ¶
func (br *BaseRunner) CollectF(f func(map[string]string))
func (*BaseRunner) Ctx ¶
func (br *BaseRunner) Ctx() context.Context
func (*BaseRunner) Debug ¶
func (br *BaseRunner) Debug(msg string, kvs ...any)
func (*BaseRunner) DelKey ¶
func (br *BaseRunner) DelKey(k string)
func (*BaseRunner) Done ¶
func (br *BaseRunner) Done() <-chan struct{}
func (*BaseRunner) Error ¶
func (br *BaseRunner) Error() error
func (*BaseRunner) FloatValue ¶
func (br *BaseRunner) FloatValue(k string) float64
func (*BaseRunner) FloatValueOr ¶
func (br *BaseRunner) FloatValueOr(k string, d float64) float64
func (*BaseRunner) GetChild ¶
func (br *BaseRunner) GetChild(name string) Runner
func (*BaseRunner) HasKey ¶
func (br *BaseRunner) HasKey(k string) bool
func (*BaseRunner) Info ¶
func (br *BaseRunner) Info(msg string, kvs ...any)
func (*BaseRunner) Init ¶
func (br *BaseRunner) Init() error
func (*BaseRunner) Int64Value ¶
func (br *BaseRunner) Int64Value(k string) int64
func (*BaseRunner) Int64ValueOr ¶
func (br *BaseRunner) Int64ValueOr(k string, d int64) int64
func (*BaseRunner) IntValue ¶
func (br *BaseRunner) IntValue(k string) int
func (*BaseRunner) IntValueOr ¶
func (br *BaseRunner) IntValueOr(k string, d int) int
func (*BaseRunner) Logger ¶
func (br *BaseRunner) Logger() *zap.Logger
func (*BaseRunner) Name ¶
func (br *BaseRunner) Name() string
func (*BaseRunner) OnChildDone ¶
func (br *BaseRunner) OnChildDone(_ Runner) error
func (*BaseRunner) Parent ¶
func (br *BaseRunner) Parent() Runner
func (*BaseRunner) SelfError ¶
func (br *BaseRunner) SelfError() error
func (*BaseRunner) SetCtx ¶
func (br *BaseRunner) SetCtx(ctx context.Context)
func (*BaseRunner) SetName ¶
func (br *BaseRunner) SetName(n string)
func (*BaseRunner) SetParent ¶
func (br *BaseRunner) SetParent(r Runner)
func (*BaseRunner) Start ¶
func (br *BaseRunner) Start() error
func (*BaseRunner) Started ¶
func (br *BaseRunner) Started() <-chan struct{}
func (*BaseRunner) Stop ¶
func (br *BaseRunner) Stop() error
func (*BaseRunner) StopDone ¶
func (br *BaseRunner) StopDone() <-chan struct{}
func (*BaseRunner) Stopping ¶
func (br *BaseRunner) Stopping() <-chan struct{}
func (*BaseRunner) Store ¶
func (br *BaseRunner) Store(k string, v any)
func (*BaseRunner) StoreValues ¶
func (br *BaseRunner) StoreValues(m map[string]string)
func (*BaseRunner) StringValue ¶
func (br *BaseRunner) StringValue(k string) string
func (*BaseRunner) StringValueOr ¶
func (br *BaseRunner) StringValueOr(k string, d string) string
func (*BaseRunner) WaitChildrenDone ¶
func (br *BaseRunner) WaitChildrenDone()
func (*BaseRunner) Warn ¶
func (br *BaseRunner) Warn(msg string, kvs ...any)
func (*BaseRunner) WithLogger ¶
func (br *BaseRunner) WithLogger(l *zap.Logger, kvs ...any)
func (*BaseRunner) WithLoggerNoName ¶
func (br *BaseRunner) WithLoggerNoName(l *zap.Logger, kvs ...any)
type Runner ¶
type Runner interface {
Init() error
Start() error
Stop() error
Name() string
SetName(string)
Ctx() context.Context
SetCtx(context.Context)
Logger() *zap.Logger
WithLogger(l *zap.Logger, kvs ...any)
WithLoggerNoName(l *zap.Logger, kvs ...any)
Debug(msg string, kvs ...any)
Info(msg string, kvs ...any)
Warn(msg string, kvs ...any)
Err(msg string, err error, kvs ...any)
Store(k string, v any)
DelKey(k string)
HasKey(k string) bool
BoolValue(k string) bool
StringValue(k string) string
StringValueOr(k string, d string) string
IntValue(k string) int
IntValueOr(k string, d int) int
Int64Value(k string) int64
Int64ValueOr(k string, d int64) int64
FloatValue(k string) float64
FloatValueOr(k string, d float64) float64
ValueTo(k string, to any) error
Collect() map[string]string
CollectF(func(map[string]string))
StoreValues(map[string]string)
Started() <-chan struct{}
Stopping() <-chan struct{}
StopDone() <-chan struct{}
Done() <-chan struct{}
GetChild(string) Runner
Children() []Runner
ChildrenError() error
AppendRunner(Runner) bool
WaitChildrenDone()
SetParent(Runner)
Parent() Runner
OnChildDone(Runner) error
AppendError(err ...error)
Error() error
SelfError() error
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.