utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 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 GetAuthType

func GetAuthType(dest backendconfig.DestinationT) (authType string)

func GetRudderAccountId

func GetRudderAccountId(destination *backendconfig.DestinationT) string

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