instrument

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// OverallTime represents the overall process from consume to project
	OverallTime = Action("kafka_transformer_overall")
	// KafkaConsumerConsume represents the consume action
	KafkaConsumerConsume = Action("kafka_consumer_consume")
	// KafkaProducerProduce represents the produce action to kafka
	KafkaProducerProduce = Action("kafka_producer_produce")
	// TransformerTransform represents the transform action to kafka
	TransformerTransform = Action("transformer_transform")
	// ProjectorProject represents the project action
	ProjectorProject = Action("projector_project")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

Action represents the main action of the kafka transformer

type Collector

type Collector interface {
	Before(message *confluent.Message, action Action, start time.Time)
	After(message *confluent.Message, action Action, err error, start time.Time)
}

Collector allows to specify a collector for all the main actions of the kafka transformer. Main actions are : consume, transform, produce/project Before is called before the action and After called after. warning: message can be nil, check err != nil also for errors

type MultiCollector added in v0.0.4

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

MultiCollector allows you to compose a list of collector

func NewMultiCollector added in v0.0.4

func NewMultiCollector(collectors ...Collector) MultiCollector

NewMultiCollector is a constructor for multi collector

func (MultiCollector) After added in v0.0.4

func (m MultiCollector) After(message *confluent.Message, action Action, err error, start time.Time)

After calls all After method of inner collectors

func (MultiCollector) Before added in v0.0.4

func (m MultiCollector) Before(message *confluent.Message, action Action, start time.Time)

Before calls all Before method of inner collectors

Jump to

Keyboard shortcuts

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