telemetry

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WriteKey     string
	DataPlaneURL string
)

Functions

func Report

func Report(event *telemetryv1.Event) bool

func Start added in v0.17.0

func Start(ctx context.Context, store storage.Store)

func Stop added in v0.17.0

func Stop()

Types

type Conf

type Conf struct {
	// StateDir is used to persist state to avoid repeatedly sending the data over and over again.
	StateDir string `yaml:"stateDir" conf:",example=${HOME}/.config/cerbos"`
	// Disabled sets whether telemetry collection is disabled or not.
	Disabled bool `yaml:"disabled" conf:",example=false"`
	// ReportInterval is the interval between telemetry pings.
	ReportInterval time.Duration `yaml:"reportInterval" conf:",example=1h"`
}

Conf for telemetry reporting.

func (*Conf) Key

func (c *Conf) Key() string

func (*Conf) SetDefaults added in v0.17.0

func (c *Conf) SetDefaults()

func (*Conf) Validate added in v0.17.0

func (c *Conf) Validate() (errs error)

type Interceptors added in v0.17.0

type Interceptors interface {
	UnaryServerInterceptor() grpc.UnaryServerInterceptor
	StreamServerInterceptor() grpc.StreamServerInterceptor
}

func Intercept added in v0.17.0

func Intercept() Interceptors

type Reporter added in v0.17.0

type Reporter interface {
	Report(*telemetryv1.Event) bool
	Intercept() Interceptors
	Stop() error
}

Jump to

Keyboard shortcuts

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