Documentation ¶
Index ¶
- Variables
- type ChainTrackerServicer
- type Config
- type ConfigServicer
- type GolinksServicer
- type Service
- func (w *Service) AddWorker(rootPath string, generationPeriod int, ignorePaths []string) error
- func (w *Service) DeleteWorkerByIndex(index int) error
- func (w *Service) Execute(ctx context.Context) error
- func (w *Service) GetWorkerByIndex(index int) (*Worker, error)
- func (w *Service) ScheduleWork(workerID string, task func() error) error
- type Servicer
- type Worker
- type WorkerServicer
- type WorkerTask
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadRootPath = errors.New("bad root_path")
View Source
var ErrWorkerIndexOutOfBonds = errors.New("worker index out of bounds")
View Source
var ErrWorkerManagerNotStarted = errors.New("worker cannot be restarted without an existing context")
Functions ¶
This section is empty.
Types ¶
type ChainTrackerServicer ¶
type ChainTrackerServicer interface {
ChainTrackerService() *chaintracker.Service
}
type ConfigServicer ¶
type GolinksServicer ¶
type Service ¶
type Service struct { WorkerConfig *Config // contains filtered or unexported fields }
func (*Service) DeleteWorkerByIndex ¶
type Servicer ¶
type Servicer interface { ConfigServicer GolinksServicer ChainTrackerServicer WorkerServicer }
type Worker ¶
type Worker struct { RootPath string `json:"root_path"` GenerationPeriod int `json:"generation_period"` IgnorePaths []string `json:"ignore_paths"` // contains filtered or unexported fields }
func (*Worker) AddCancelFunc ¶
func (w *Worker) AddCancelFunc(cancelFunc func())
type WorkerServicer ¶
type WorkerServicer interface {
WorkerService() *Service
}
type WorkerTask ¶
type WorkerTask struct {
// contains filtered or unexported fields
}
func (*WorkerTask) ID ¶
func (wt *WorkerTask) ID() string
func (*WorkerTask) Work ¶
func (wt *WorkerTask) Work() func() error
Click to show internal directories.
Click to hide internal directories.