Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseWorker ¶
type BaseWorker struct {
// contains filtered or unexported fields
}
BaseWorker runs a workload in a cancellable goroutine.
func NewBaseWorker ¶
func NewBaseWorker(name string, logger Logger, workload Workload) *BaseWorker
NewBaseWorker creates a new worker with custom logger and workload.
func (*BaseWorker) Name ¶
func (w *BaseWorker) Name() string
func (*BaseWorker) Start ¶
func (w *BaseWorker) Start(ctx context.Context)
func (*BaseWorker) Stop ¶
func (w *BaseWorker) Stop()
type StdLogger ¶
type StdLogger struct{}
StdLogger is a default implementation using Go's log package.
Click to show internal directories.
Click to hide internal directories.