Documentation
¶
Index ¶
- Variables
- func BeforeWrapper(beforeRun func(context.Context) error) *runBeforeWrapper
- func DiScope() *s.XScope
- func DiScopeNamed(appName string) *s.XScope
- func RunAfter(runners ...interface{}) (err error)
- func RunBefore(ctx context.Context, cancel context.CancelFunc, runners ...interface{}) error
- func RunWrapper(run func(context.Context) error) *runWrapper
- func Runner(ctx context.Context, log *slog.Logger, cancel context.CancelFunc, ...) error
- func Wrapper(beforeRun func(context.Context) error, run func(context.Context) error) *wrapper
- type After
- type AfterDecorator
- type Before
- type BeforeDecorator
- type DummyRegister
- type Executor
- type Handler
- func (s *Handler) Add(item interface{})
- func (s Handler) Run(ctx context.Context, cancel context.CancelFunc) error
- func (s Handler) RunAfter() error
- func (s Handler) RunBefore(ctx context.Context, cancel context.CancelFunc) error
- func (s Handler) RunFunc(ctx context.Context, cancel context.CancelFunc, runFunc func() error) (returnErr error)
- func (s *Handler) RunOnce(ctx context.Context, cancel context.CancelFunc, runFunc func() error) error
- func (s *Handler) RunOnceWithContext(ctx context.Context, cancel context.CancelFunc, ...) error
- func (s *Handler) RunWithSigTerm(ctx context.Context, cancel context.CancelFunc) error
- func (s *Handler) Running() chan struct{}
- type NoopRegister
- type Register
- type Run
- type RunDecorator
- type RunnerHandler
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BeforeWrapper ¶
func DiScopeNamed ¶
func RunBefore ¶
func RunBefore(ctx context.Context, cancel context.CancelFunc, runners ...interface{}) error
func RunWrapper ¶
Types ¶
type AfterDecorator ¶
type AfterDecorator func() error
func (AfterDecorator) After ¶
func (d AfterDecorator) After() error
type BeforeDecorator ¶
type DummyRegister ¶
type DummyRegister struct {
// contains filtered or unexported fields
}
func NewDummyRegister ¶
func NewDummyRegister() *DummyRegister
func (*DummyRegister) Add ¶
func (d *DummyRegister) Add(a interface{})
func (*DummyRegister) RunAfter ¶
func (d *DummyRegister) RunAfter() error
type Executor ¶
type Executor struct {
BeforeDecorator
RunDecorator
AfterDecorator
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) RunOnceWithContext ¶
func (*Handler) RunWithSigTerm ¶
type NoopRegister ¶
type NoopRegister struct {
}
func (NoopRegister) Add ¶
func (n NoopRegister) Add(interface{})
type RunDecorator ¶
Click to show internal directories.
Click to hide internal directories.