adhoc

package
v0.0.0-...-05b72f9 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backoffer

type Backoffer interface {
	// Reset causes the backoff provider to go back its initial
	// state, before any calls to Duration() were made.
	Reset()
	// Duration returns the duration to sleep.
	Duration() time.Duration
}

Backoffer defines an interface to provide backoff durations.

The implementation of this interface SHOULD NOT perform the actual sleep, but rather return the duration to sleep.

type ClientConn

type ClientConn interface {
	grpc.ClientConnInterface
	GetState() connectivity.State
}

ClientConn represents the GRPC client connection that can be used to make RPC calls to the Synthetic Monitoring API.

type Error

type Error string

Error represents errors returned from this package.

func (Error) Error

func (e Error) Error() string

type Handler

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

Handler is in charge of retrieving ad-hoc checks from the synthetic-monitoring-api, running them and forwarding the results to the publisher.

func NewHandler

func NewHandler(opts HandlerOpts) (*Handler, error)

NewHandler creates a new Handler using the specified options.

func (*Handler) Run

func (h *Handler) Run(ctx context.Context) error

Run starts the handler.

type HandlerOpts

type HandlerOpts struct {
	Conn           ClientConn
	Logger         zerolog.Logger
	Backoff        Backoffer
	Publisher      pusher.Publisher
	TenantCh       chan<- sm.Tenant
	PromRegisterer prometheus.Registerer
	Features       feature.Collection
	K6Runner       k6runner.Runner
	// contains filtered or unexported fields
}

HandlerOpts is used to pass configuration options to the Handler.

type Streams

type Streams = []logproto.Stream

type TimeSeries

type TimeSeries = []prompb.TimeSeries

Jump to

Keyboard shortcuts

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