functions

package
v0.0.0-rc12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YDS = EventSource("YDS")
	CDC = EventSource("CDC")

	OK               = ProcessResult("Ok")
	Split            = ProcessResult("Split")
	Dropped          = ProcessResult("Dropped")
	ProcessingFailed = ProcessResult("ProcessingFailed")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CDCPayload

type CDCPayload struct {
	// TODO: Fill with generic CDC event?
	abstract.ChangeItem
}

type Data

type Data struct {
	Records []Record `json:"Records"`
}

type EventSource

type EventSource string

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

func NewExecutor

func NewExecutor(cfg *model.DataTransformOptions, baseURL string, source EventSource, lgr log.Logger, registry metrics.Registry) (*Executor, error)

func (*Executor) Do

func (e *Executor) Do(data []abstract.ChangeItem) ([]abstract.ChangeItem, error)

type ProcessResult

type ProcessResult string

type Record

type Record struct {
	CDC               *CDCPayload   `json:"cdc"`
	CDCSplit          []CDCPayload  `json:"cdc_split"`
	YDS               *YDSPayload   `json:"kinesis"` // maybe YDS?
	Result            ProcessResult `json:"result"`
	EventSource       EventSource   `json:"eventSource"`
	EventID           string        `json:"eventID"`
	InvokeIdentityArn string        `json:"invokeIdentityArn"`
	EventVersion      string        `json:"eventVersion"`
	EventName         string        `json:"eventName"`
	EventSourceARN    string        `json:"eventSourceARN"`
	AwsRegion         string        `json:"awsRegion"`
}

type YDSPayload

type YDSPayload struct {
	PartitionKey string  `json:"partitionKey"`
	Data         string  `json:"data"`
	SeqNo        uint64  `json:"sequenceNumber"`
	WriteTime    float64 `json:"approximateArrivalTimestamp"`
}

Jump to

Keyboard shortcuts

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