transformer

package
v1.8.0-rc.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BATCH            = "BATCH"
	ROUTER_TRANSFORM = "ROUTER_TRANSFORM"
)

Variables

This section is empty.

Functions

func Init

func Init()

Types

type ProxyRequestMetadata added in v1.3.0

type ProxyRequestMetadata struct {
	JobID         int64           `json:"jobId"`
	AttemptNum    int             `json:"attemptNum"`
	UserID        string          `json:"userId"`
	SourceID      string          `json:"sourceId"`
	DestinationID string          `json:"destinationId"`
	WorkspaceID   string          `json:"workspaceId"`
	Secret        json.RawMessage `json:"secret"`
	DestInfo      json.RawMessage `json:"destInfo,omitempty"`
}

type ProxyRequestParams added in v1.0.2

type ProxyRequestParams struct {
	ResponseData ProxyRequestPayload
	DestName     string
	JobID        int64
	BaseUrl      string
}

type ProxyRequestPayload added in v1.3.0

type ProxyRequestPayload struct {
	integrations.PostParametersT
	Metadata ProxyRequestMetadata `json:"metadata,omitempty"`
}

type Transformer

type Transformer interface {
	Transform(transformType string, transformMessage *types.TransformMessageT) []types.DestinationJobT
	ProxyRequest(ctx context.Context, proxyReqParams *ProxyRequestParams) (statusCode int, respBody, contentType string)
}

Transformer provides methods to transform events

func NewTransformer

func NewTransformer(netClientTimeout, backendProxyTimeout time.Duration) Transformer

NewTransformer creates a new transformer

Jump to

Keyboard shortcuts

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