utils

package
v1.5.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DRAIN_ERROR_CODE int = 410
	// transformation(router or batch)
	ERROR_AT_TF = "transformation"
	// event delivery
	ERROR_AT_DEL = "delivery"
	// custom destination manager
	ERROR_AT_CUST = "custom"
)

Variables

View Source
var (
	JobRetention time.Duration
	EmptyPayload = []byte(`{}`)
)

Functions

func EnhanceJSON

func EnhanceJSON(rawMsg []byte, key, val string) []byte

rawMsg passed must be a valid JSON

func Init

func Init()

func IsNotEmptyString

func IsNotEmptyString(s string) bool

func ToBeDrained

func ToBeDrained(job *jobsdb.JobT, destID, toAbortDestinationIDs string, destinationsMap map[string]*BatchDestinationT) (bool, string)

Types

type BatchDestinationT

type BatchDestinationT struct {
	Destination backendconfig.DestinationT
	Sources     []backendconfig.SourceT
}

type DrainStats

type DrainStats struct {
	Count     int
	Reasons   []string
	Workspace string
}

type SendPostResponse

type SendPostResponse struct {
	StatusCode          int
	ResponseContentType string
	ResponseBody        []byte
}

Jump to

Keyboard shortcuts

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