scout

package
v2.21.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewReporter = func(ctx context.Context, mode string) context.Context {
	return ctx
}

NewReporter creates a new initialized Reporter instance that can be used to send telepresence reports to Metriton and assigns it to the current context.

Functions

func Close added in v2.14.3

func Close(ctx context.Context)

func Report added in v2.14.3

func Report(ctx context.Context, action string, entries ...Entry)

Report sends a report using the Reporter found in the current context.

func Run added in v2.14.3

func Run(ctx context.Context) error

Run ensures that all reports on the send queue are sent to the endpoint.

func SetMetadatum added in v2.14.3

func SetMetadatum(ctx context.Context, key string, value any)

SetMetadatum associates the given key with the given value in the metadata of the Reporter found in the current context.

func Start added in v2.14.3

func Start(ctx context.Context)

Start runs the Reporter found in the current context in a goroutine.

func WithReporter added in v2.14.3

func WithReporter(ctx context.Context, reporter Reporter) context.Context

func WithSession added in v2.17.0

func WithSession(ctx context.Context, s session) context.Context

Types

type Entry added in v2.4.10

type Entry struct {
	Key   string
	Value any
}

Entry is a key/value association used when reporting.

type Reporter added in v2.4.10

type Reporter interface {
	Close()
	InstallID() string
	Report(ctx context.Context, action string, entries ...Entry)
	Run(ctx context.Context) error
	SetMetadatum(ctx context.Context, key string, value any)
	Start(ctx context.Context)
}

Reporter is a Metriton reporter.

Jump to

Keyboard shortcuts

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