Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ErrWorkerAlreadyRunning = errors.New("worker already running")
Functions ¶
This section is empty.
Types ¶
type DbContext ¶
type DbContext interface {
GetScriptsRepository(projectID string) (scripts.Repository, error)
}
type InMemoryQueue ¶
type InMemoryQueue struct {
// contains filtered or unexported fields
}
func NewInMemoryQueue ¶
func NewInMemoryQueue(size uint64) (*InMemoryQueue, error)
type Job ¶
type Job struct { ID string ProjectID string CausedBy Cause Script scripts.ScriptEntity }
Job represents a running script
type OutputWriter ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
type Settings ¶
type Settings struct {
PoolSize uint64
}
func NewDefaultSettings ¶
func NewDefaultSettings() Settings
type StateWriter ¶
type WorkerFactory ¶
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
func NewWorkerPool ¶
func NewWorkerPool( size uint64, logger *zerolog.Logger, status StateWriter, factory WorkerFactory, ) (*WorkerPool, error)
func (*WorkerPool) Cancel ¶
func (wp *WorkerPool) Cancel(projectID, jobID string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.