transformationdebugger

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func IsUploadEnabled

func IsUploadEnabled(id string) bool

func RecordTransformationStatus

func RecordTransformationStatus(transformStatus *TransformStatusT) bool

RecordTransformationStatus is used to put the transform event in the eventBatchChannel, which will be processed by handleEvents.

func Setup

func Setup()

Setup initializes this module

func UploadTransformationStatus

func UploadTransformationStatus(tStatus *TransformationStatusT)

Types

type EventBeforeTransform

type EventBeforeTransform struct {
	EventName  string               `json:"eventName"`
	EventType  string               `json:"eventType"`
	ReceivedAt string               `json:"receivedAt"`
	Payload    types.SingularEventT `json:"payload"`
}

type EventPayloadAfterTransform

type EventPayloadAfterTransform struct {
	EventName string               `json:"eventName"`
	EventType string               `json:"eventType"`
	Payload   types.SingularEventT `json:"payload"`
}

type EventsAfterTransform

type EventsAfterTransform struct {
	ReceivedAt    string                        `json:"receivedAt"`
	IsDropped     bool                          `json:"isDropped"`
	Error         string                        `json:"error"`
	StatusCode    int                           `json:"statusCode"`
	EventPayloads []*EventPayloadAfterTransform `json:"payload"`
}

type TransformStatusT

type TransformStatusT struct {
	TransformationID string                `json:"transformationId"`
	SourceID         string                `json:"sourceId"`
	DestinationID    string                `json:"destinationId"`
	EventBefore      *EventBeforeTransform `json:"eventBefore"`
	EventsAfter      *EventsAfterTransform `json:"eventsAfter"`
	IsError          bool                  `json:"error"`
}

TransformStatusT is a structure to hold transformation status

type TransformationStatusT

type TransformationStatusT struct {
	SourceID              string
	DestID                string
	Destination           *backendconfig.DestinationT
	UserTransformedEvents []transformer.TransformerEventT
	EventsByMessageID     map[string]types.SingularEventWithReceivedAt
	FailedEvents          []transformer.TransformerResponseT
	UniqueMessageIds      map[string]struct{}
}

type TransformationStatusUploader

type TransformationStatusUploader struct{}

func (*TransformationStatusUploader) Transform

func (transformationStatusUploader *TransformationStatusUploader) Transform(data interface{}) ([]byte, error)

type UploadT

type UploadT struct {
	Payload []interface{} `json:"payload"`
}

Jump to

Keyboard shortcuts

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