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
Click to show internal directories.
Click to hide internal directories.