mapper

package
v2.5.0-dev Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper interface {
	// Transform transforms the given payloads and returns the transformed payloads and the Mapper to use for the next
	// transformation at the next flush a minute later
	Transform([]transport.Payload) ([]transport.Payload, Mapper)
}

Mapper is an interface for transforming payloads to comply with different types of lifecycle events in the application.

func NewAppClosingMapper

func NewAppClosingMapper(next Mapper) Mapper

NewAppClosingMapper returns a new Mapper that appends an AppClosing payload to the given payloads and calls the underlying Mapper with it.

func NewAppStartedMapper

func NewAppStartedMapper(next Mapper) Mapper

NewAppStartedMapper returns a new Mapper that adds an AppStarted payload to the beginning of all payloads and pass it down to irs underlying mapper. The AppStarted payload ingest the transport.AppClientConfigurationChange and transport.AppProductChange payloads

func NewDefaultMapper

func NewDefaultMapper(heartbeatInterval, extendedHeartBeatInterval time.Duration) Mapper

NewDefaultMapper returns a Mapper that transforms payloads into a MessageBatch and adds a heartbeat message. The heartbeat message is added every heartbeatInterval.

Jump to

Keyboard shortcuts

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