scout

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scout

type Scout struct {
	Reporter *metriton.Reporter
	// contains filtered or unexported fields
}

Scout is a Metriton reported

func NewScout

func NewScout(ctx context.Context, mode string) (s *Scout)

NewScout creates a new initialized Scout instance that can be used to send telepresence reports to Metriton

func (*Scout) Report

func (s *Scout) Report(ctx context.Context, action string, meta ...ScoutMeta)

Report constructs and sends a report. It includes the fixed (growing) set of metadata in the Scout structure and the pairs passed as arguments to this call. It also includes and increments the index, which can be used to determine the correct order of reported events for this installation attempt (correlated by the trace_id set at the start).

func (*Scout) SetMetadatum

func (s *Scout) SetMetadatum(key string, value interface{})

SetMetadatum associates the given key with the given value in the metadata of this instance. It's an error if the key already exists.

type ScoutMeta

type ScoutMeta struct {
	Key   string
	Value interface{}
}

ScoutMeta is a key/value association used when reporting

type ScoutReport

type ScoutReport struct {
	Action             string
	Metadata           map[string]interface{}
	PersistentMetadata map[string]interface{}
}

Jump to

Keyboard shortcuts

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