syntheticmonitoring

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const SyntheticMonitoringCheckKind = "SyntheticMonitoringCheck"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientProvider

type ClientProvider interface {
	Client() (*smapi.Client, error)
}

type Probes

type Probes struct {
	ByID   map[int64]synthetic_monitoring.Probe
	ByName map[string]synthetic_monitoring.Probe
}

type Provider

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

Provider is a grizzly.Provider implementation for Grafana.

func NewProvider

func NewProvider(config *config.SyntheticMonitoringConfig) *Provider

NewProvider instantiates a new Provider.

func (*Provider) APIVersion

func (p *Provider) APIVersion() string

APIVersion returns the group and version of this provider

func (*Provider) Client

func (p *Provider) Client() (*smapi.Client, error)

NewClient creates a new client for synthetic monitoring go client

func (*Provider) GetHandlers

func (p *Provider) GetHandlers() []grizzly.Handler

GetHandlers identifies the handlers for the Grafana provider

func (*Provider) Group

func (p *Provider) Group() string

Group returns the group name of the Grafana provider

func (*Provider) Name added in v0.4.1

func (p *Provider) Name() string

func (*Provider) Status added in v0.5.0

func (p *Provider) Status() grizzly.ProviderStatus

func (*Provider) Validate added in v0.4.2

func (p *Provider) Validate() error

func (*Provider) Version

func (p *Provider) Version() string

Version returns the version of this provider

type SyntheticMonitoringHandler

type SyntheticMonitoringHandler struct {
	grizzly.BaseHandler
}

SyntheticMonitoringHandler is a Grizzly Handler for Grafana Synthetic Monitoring

func NewSyntheticMonitoringHandler

func NewSyntheticMonitoringHandler(provider grizzly.Provider) *SyntheticMonitoringHandler

NewSyntheticMonitoringHandler returns a Grizzly Handler for Grafana Synthetic Monitoring

func (*SyntheticMonitoringHandler) Add

Add adds a new check to the SyntheticMonitoring endpoint

func (*SyntheticMonitoringHandler) GetByUID

GetByUID retrieves JSON for a resource from an endpoint, by UID

func (*SyntheticMonitoringHandler) GetRemote

func (h *SyntheticMonitoringHandler) GetRemote(resource grizzly.Resource) (*grizzly.Resource, error)

GetRemote retrieves a datasource as a Resource

func (*SyntheticMonitoringHandler) GetSpecUID

func (h *SyntheticMonitoringHandler) GetSpecUID(resource grizzly.Resource) (string, error)

func (*SyntheticMonitoringHandler) GetUID

func (h *SyntheticMonitoringHandler) GetUID(resource grizzly.Resource) (string, error)

GetUID returns the UID for a resource

func (*SyntheticMonitoringHandler) ListRemote

func (h *SyntheticMonitoringHandler) ListRemote() ([]string, error)

ListRemote retrieves as list of UIDs of all remote resources

func (*SyntheticMonitoringHandler) Prepare

func (h *SyntheticMonitoringHandler) Prepare(existing *grizzly.Resource, resource grizzly.Resource) *grizzly.Resource

Prepare gets a resource ready for dispatch to the remote endpoint

func (*SyntheticMonitoringHandler) ResourceFilePath

func (h *SyntheticMonitoringHandler) ResourceFilePath(resource grizzly.Resource, filetype string) string

ResourceFilePath returns the location on disk where a resource should be updated

func (*SyntheticMonitoringHandler) SpecToCheck

func (*SyntheticMonitoringHandler) Unprepare

Unprepare removes unnecessary elements from a remote resource ready for presentation/comparison

func (*SyntheticMonitoringHandler) Update

func (h *SyntheticMonitoringHandler) Update(existing, resource grizzly.Resource) error

Update pushes an updated check to the SyntheticMonitoring endpoing

func (*SyntheticMonitoringHandler) Validate

func (h *SyntheticMonitoringHandler) Validate(resource grizzly.Resource) error

Validate returns the uid of resource

Jump to

Keyboard shortcuts

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