Documentation
¶
Index ¶
- Constants
- type ClientProvider
- type Probes
- type Provider
- func (p *Provider) APIVersion() string
- func (p *Provider) Client() (*smapi.Client, error)
- func (p *Provider) GetHandlers() []grizzly.Handler
- func (p *Provider) Group() string
- func (p *Provider) Name() string
- func (p *Provider) Status() grizzly.ProviderStatus
- func (p *Provider) Validate() error
- func (p *Provider) Version() string
- type SyntheticMonitoringHandler
- func (h *SyntheticMonitoringHandler) Add(resource grizzly.Resource) error
- func (h *SyntheticMonitoringHandler) GetByUID(uid string) (*grizzly.Resource, error)
- func (h *SyntheticMonitoringHandler) GetRemote(resource grizzly.Resource) (*grizzly.Resource, error)
- func (h *SyntheticMonitoringHandler) GetSpecUID(resource grizzly.Resource) (string, error)
- func (h *SyntheticMonitoringHandler) GetUID(resource grizzly.Resource) (string, error)
- func (h *SyntheticMonitoringHandler) ListRemote() ([]string, error)
- func (h *SyntheticMonitoringHandler) Prepare(existing *grizzly.Resource, resource grizzly.Resource) *grizzly.Resource
- func (h *SyntheticMonitoringHandler) ResourceFilePath(resource grizzly.Resource, filetype string) string
- func (h *SyntheticMonitoringHandler) SpecToCheck(r *grizzly.Resource) (synthetic_monitoring.Check, error)
- func (h *SyntheticMonitoringHandler) Unprepare(resource grizzly.Resource) *grizzly.Resource
- func (h *SyntheticMonitoringHandler) Update(existing, resource grizzly.Resource) error
- func (h *SyntheticMonitoringHandler) Validate(resource grizzly.Resource) error
Constants ¶
const SyntheticMonitoringCheckKind = "SyntheticMonitoringCheck"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientProvider ¶
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 ¶
APIVersion returns the group and version of this provider
func (*Provider) GetHandlers ¶
GetHandlers identifies the handlers for the Grafana provider
func (*Provider) Status ¶ added in v0.5.0
func (p *Provider) Status() grizzly.ProviderStatus
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 ¶
func (h *SyntheticMonitoringHandler) Add(resource grizzly.Resource) error
Add adds a new check to the SyntheticMonitoring endpoint
func (*SyntheticMonitoringHandler) GetByUID ¶
func (h *SyntheticMonitoringHandler) GetByUID(uid string) (*grizzly.Resource, error)
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 (h *SyntheticMonitoringHandler) SpecToCheck(r *grizzly.Resource) (synthetic_monitoring.Check, error)
func (*SyntheticMonitoringHandler) Unprepare ¶
func (h *SyntheticMonitoringHandler) Unprepare(resource grizzly.Resource) *grizzly.Resource
Unprepare removes unnecessary elements from a remote resource ready for presentation/comparison