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 ¶
NewAppClosingMapper returns a new Mapper that appends an AppClosing payload to the given payloads and calls the underlying Mapper with it.
func NewAppStartedMapper ¶
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 ¶
NewDefaultMapper returns a Mapper that transforms payloads into a MessageBatch and adds a heartbeat message. The heartbeat message is added every heartbeatInterval.