worker

package
v0.0.0-...-b9e0ff1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllTasks map[string]Worker

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Consume()
}

type KafkaScaleConsumer

type KafkaScaleConsumer struct {
	// contains filtered or unexported fields
}

func NewKafkaScaleConsumer

func NewKafkaScaleConsumer(
	taskName string,
	name string,
	brokers []string,
	topic []string,
	res chan<- model.KafkaLog,
	ctx context.Context,
	numConsumeChan chan<- int64,
	factor int) *KafkaScaleConsumer

func (KafkaScaleConsumer) Consume

func (c KafkaScaleConsumer) Consume()

type KafkaScaleProducer

type KafkaScaleProducer struct {
	// contains filtered or unexported fields
}

func NewKafkaScaleProducer

func NewKafkaScaleProducer(
	taskName string,
	name string,
	brokers []string,
	topic string,
	res <-chan model.KafkaLog,
	ctx context.Context,
	factor int,
	numProduceSucceedChan chan<- int64,
	numProduceFailedChan chan<- int64) *KafkaScaleProducer

func (KafkaScaleProducer) Produce

func (p KafkaScaleProducer) Produce()

type Producer

type Producer interface {
	Produce()
}

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(
	name string,
	inputBrokers []string,
	inputTopics []string,
	outputBrokers []string,
	outputTopic string,
	factor int,
	duration time.Duration,
	ms *metric.MetricSystem,
	workerAddress string) *Worker

func (Worker) Fire

func (w Worker) Fire()

func (Worker) GetTaskName

func (w Worker) GetTaskName() string

func (Worker) StopAndClean

func (w Worker) StopAndClean()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL