accumulator

package
v0.0.0-...-e9a242d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinQueueCapacity     = 2
	CBRetrySleepDuration = 10 * time.Millisecond // TODO: fine tune this value
	ComponentName        = "accumulator"
)
View Source
const FlowMetricKey string = "flow"

Variables

This section is empty.

Functions

This section is empty.

Types

type Accumulator

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

func New

func New(
	flowName string,
	l *slog.Logger,
	limitOfBytes int,
	separator []byte,
	queueCapacity int,
	next domain.DataFlow,
	cb circuitbreaker.CircuitBreaker,
	metricRegistry *prometheus.Registry) *Accumulator

func (*Accumulator) Enqueue

func (b *Accumulator) Enqueue(data []byte) error

func (*Accumulator) Run

func (b *Accumulator) Run(ctx context.Context)

Run should be called in a new goroutine

Jump to

Keyboard shortcuts

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