utils

package
v0.0.0-...-0ade494 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: AGPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DRAIN_ERROR_CODE int = 410
)

Variables

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

Functions

func BasicAuth

func BasicAuth(username, password string) string

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