processor

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaSpanProcessor

type KafkaSpanProcessor struct {
	io.Closer
	// contains filtered or unexported fields
}

KafkaSpanProcessor implements SpanProcessor for Kafka messages

func NewSpanProcessor

func NewSpanProcessor(params SpanProcessorParams) *KafkaSpanProcessor

NewSpanProcessor creates a new KafkaSpanProcessor

func (KafkaSpanProcessor) Process

func (s KafkaSpanProcessor) Process(message Message) error

Process unmarshals and writes a single kafka message

type Message

type Message interface {
	Value() []byte
}

Message contains the fields of the kafka message that the span processor uses

type ParallelProcessor

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

ParallelProcessor is a processor that processes in parallel using a pool of goroutines

func NewParallelProcessor

func NewParallelProcessor(
	processor SpanProcessor,
	parallelism int,
	logger *zap.Logger) *ParallelProcessor

NewParallelProcessor creates a new parallel processor

func (*ParallelProcessor) Close

func (k *ParallelProcessor) Close() error

Close terminates all running goroutines

func (*ParallelProcessor) Process

func (k *ParallelProcessor) Process(message Message) error

Process queues a message for processing

func (*ParallelProcessor) Start

func (k *ParallelProcessor) Start()

Start begins processing queued messages

type SpanProcessor

type SpanProcessor interface {
	Process(input Message) error
	io.Closer
}

SpanProcessor processes kafka spans

func NewDecoratedProcessor

func NewDecoratedProcessor(f metrics.Factory, processor SpanProcessor) SpanProcessor

NewDecoratedProcessor returns a processor with metrics

type SpanProcessorParams

type SpanProcessorParams struct {
	Writer       spanstore.Writer
	Unmarshaller kafka.Unmarshaller
}

SpanProcessorParams stores the necessary parameters for a SpanProcessor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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