backendutils

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_SINK_TIMEOUT_SECONDS int = 15

Functions

func StartSinkWorker

func StartSinkWorker(input <-chan []envelope.Envelope, shutdown <-chan int, sink Sink) error

Each sink runs an associated worker goroutine, which is responsible for dequeuing envelopes.

Types

type Sink

type Sink interface {
	Metadata() SinkMetadata
	Initialize(conf config.Sink) error
	StartWorker() error
	Enqueue(envelopes []envelope.Envelope) error
	Dequeue(ctx context.Context, envelopes []envelope.Envelope) error
	Shutdown() error
}

type SinkMetadata

type SinkMetadata struct {
	Id               *uuid.UUID `json:"id"`
	SinkType         string     `json:"sinkType"`
	Name             string     `json:"name"`
	DeliveryRequired bool       `json:"deliveryRequired"`
}

Jump to

Keyboard shortcuts

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