batched

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

Data is a struct that holds data for batched reporting

func NewData

func NewData(defaultTimeWindowInHours int) *Data

func (*Data) AddSourceEvent

func (d *Data) AddSourceEvent(in SourceEvent)

func (*Data) HeartbeatProperties

func (d *Data) HeartbeatProperties() HeartbeatProperties

func (*Data) IncrementTimeWindowInHours

func (d *Data) IncrementTimeWindowInHours()

func (*Data) Reset

func (d *Data) Reset()

type HeartbeatProperties

type HeartbeatProperties struct {
	TimeWindowInHours int                         `json:"timeWindowInHours"`
	EventsCount       int                         `json:"eventsCount"`
	Sources           map[string]SourceProperties `json:"sources"`
}

type SourceEvent

type SourceEvent struct {
	IntegrationType       config.IntegrationType         `json:"integrationType"`
	Platform              config.CommPlatformIntegration `json:"platform"`
	PluginName            string                         `json:"pluginName"`
	AnonymizedEventFields map[string]any                 `json:"anonymizedEventFields"`
	Success               bool                           `json:"success"`
	Error                 *string                        `json:"error"`
}

type SourceProperties

type SourceProperties struct {
	EventsCount int           `json:"eventsCount"`
	Events      []SourceEvent `json:"events"`
}

Jump to

Keyboard shortcuts

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