backendutils

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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