Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JobProducer ¶
type JobProducer struct {
// contains filtered or unexported fields
}
JobProducer handle the internal states of the producer.
func NewJobProducer ¶
func NewJobProducer(jobs <-chan []models.Job) (*JobProducer, error)
NewJobProducer return a new job producer. Read jobs to send from jobs channel.
func (*JobProducer) Indexes ¶
func (jp *JobProducer) Indexes() map[int32]int64
Indexes return the current write indexes by partition
type TaskConsumer ¶
type TaskConsumer struct {
// contains filtered or unexported fields
}
TaskConsumer handle the internal states of the consumer
func NewTaskConsumer ¶
func NewTaskConsumer() (*TaskConsumer, error)
NewTaskConsumer return a new task consumer
func (*TaskConsumer) Partitons ¶
func (tc *TaskConsumer) Partitons() <-chan Partition
Partitons return the incomming partition channel
func (*TaskConsumer) WaitForDrain ¶
func (tc *TaskConsumer) WaitForDrain()
WaitForDrain wait for consumer to EOF partitions
type TaskScheduler ¶
type TaskScheduler struct {
// contains filtered or unexported fields
}
TaskScheduler handle the internal states of the scheduler
func NewTaskScheduler ¶
func NewTaskScheduler(partition int32, tasks <-chan models.Task) (*TaskScheduler, error)
NewTaskScheduler return a new task scheduler
func (*TaskScheduler) Halted ¶
func (ts *TaskScheduler) Halted()
Halted wait for scheduler to be halt
func (*TaskScheduler) Jobs ¶
func (ts *TaskScheduler) Jobs() <-chan []models.Job
Jobs return the out jobs channel
Click to show internal directories.
Click to hide internal directories.