Documentation ¶
Index ¶
- type Dispatcher
- type DispatcherBuilder
- func (db *DispatcherBuilder) Build() (Dispatcher, error)
- func (db *DispatcherBuilder) WithConsole() *DispatcherBuilder
- func (db *DispatcherBuilder) WithLogfile(filename string) *DispatcherBuilder
- func (db *DispatcherBuilder) WithMemorySize(size int) *DispatcherBuilder
- func (db *DispatcherBuilder) WithWorkerNumber(count int) *DispatcherBuilder
- type Observer
- type SharedMemory
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func (*Dispatcher) AddTask ¶
func (d *Dispatcher) AddTask(task models.Task)
func (*Dispatcher) GetStatus ¶
func (d *Dispatcher) GetStatus(ID int) int
func (*Dispatcher) Wait ¶
func (d *Dispatcher) Wait()
type DispatcherBuilder ¶
type DispatcherBuilder struct {
// contains filtered or unexported fields
}
func NewDispatcherBuilder ¶
func NewDispatcherBuilder(ctx context.Context) *DispatcherBuilder
func (*DispatcherBuilder) Build ¶
func (db *DispatcherBuilder) Build() (Dispatcher, error)
func (*DispatcherBuilder) WithConsole ¶
func (db *DispatcherBuilder) WithConsole() *DispatcherBuilder
func (*DispatcherBuilder) WithLogfile ¶
func (db *DispatcherBuilder) WithLogfile(filename string) *DispatcherBuilder
func (*DispatcherBuilder) WithMemorySize ¶
func (db *DispatcherBuilder) WithMemorySize(size int) *DispatcherBuilder
func (*DispatcherBuilder) WithWorkerNumber ¶
func (db *DispatcherBuilder) WithWorkerNumber(count int) *DispatcherBuilder
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
func (*Observer) Log ¶
func (o *Observer) Log(result models.TaskResult)
func (*Observer) WithConsole ¶
func (o *Observer) WithConsole()
type SharedMemory ¶
type SharedMemory struct {
// contains filtered or unexported fields
}
func (*SharedMemory) AddTask ¶
func (s *SharedMemory) AddTask(task models.Task)
func (*SharedMemory) EndWorker ¶
func (s *SharedMemory) EndWorker()
func (*SharedMemory) ForwardTask ¶
func (s *SharedMemory) ForwardTask(task models.Task)
func (*SharedMemory) GetStatus ¶
func (s *SharedMemory) GetStatus(ID int) int
func (*SharedMemory) SetStatus ¶
func (s *SharedMemory) SetStatus(ID int, status int)
func (*SharedMemory) StartWorker ¶
func (s *SharedMemory) StartWorker()
Click to show internal directories.
Click to hide internal directories.