internal

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAndExportData

func CreateAndExportData(li LMIngest)

CreateAndExportData creates and exports data (if batching is enabled) after batching interval expires

func MakeRequest

func MakeRequest(client *http.Client, url string, body []byte, uri, method, token string, gzip bool) (*utils.Response, error)

MakeRequest compresses the payload and exports it to LM Platform

Types

type DataPayload

type DataPayload struct {
	MetricBodyList           []model.MetricPayload
	MetricResourceCreateList []model.MetricPayload
	LogBodyList              []model.LogPayload
	UpdatePropertiesBody     model.UpdateProperties
}

type LMIngest

type LMIngest interface {
	BatchInterval() time.Duration
	URI() string
	CreateRequestBody() DataPayload
	ExportData(body DataPayload, uri, method string) error
}

Jump to

Keyboard shortcuts

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