collector

package
v0.0.0-...-d133689 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSnowplowPayload

func BuildSnowplowPayload[T any](ctx context.Context, raw []byte) (*T, error)

BuildSnowplowPayload parses a JSON payload into a generic type T.

ctx - The context for the operation. Currently unused. raw - The raw JSON payload bytes to decode.

Returns a pointer to a T instance containing the decoded payload, or an error if the JSON could not be decoded.

func GetHandler

func GetHandler(p Params) echo.HandlerFunc

func PostHandler

func PostHandler(p Params) echo.HandlerFunc

PostHandler handles incoming Snowplow collector payloads and sends them to Amazon Kinesis Firehose.

p - Handler parameters

Returns an HTTP 200 response with an "ok" message on success, or an error if the payload is invalid or failed to send.

func RedirectHandler

func RedirectHandler(p Params) echo.HandlerFunc

Types

type Params

type Params struct {
	Flags       flags.Service
	FirehoseSvc *firehose.Client
	SchemaStore *registry.SchemaStore
}

type SnowplowCollectorPayload

type SnowplowCollectorPayload struct {
	Schema string          `json:"schema"`
	Data   json.RawMessage `json:"data"`
}

Jump to

Keyboard shortcuts

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