remote

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRemoteStorageDisabled = fmt.Errorf("remote graphite storage is not enabled")

ErrRemoteStorageDisabled is used to prevent remote.Fetch calls when remote storage is disabled

Functions

func Fetch

func Fetch(cfg *Config, target string, from, until int64, allowRealTimeAlerting bool) ([]*target.TimeSeries, error)

Fetch fetches remote metrics and converts them to expected format

func IsRemoteAvailable

func IsRemoteAvailable(cfg *Config) (bool, error)

IsRemoteAvailable checks if graphite API is available and returns 200 response

Types

type Config

type Config struct {
	URL           string
	CheckInterval time.Duration
	Timeout       time.Duration
	User          string
	Password      string
	Enabled       bool
}

Config represents config from remote storage

func (*Config) IsEnabled

func (c *Config) IsEnabled() bool

IsEnabled checks that remote config is enabled (url is defined and enabled flag is set)

type ErrRemoteTriggerResponse

type ErrRemoteTriggerResponse struct {
	InternalError error
	Target        string
}

ErrRemoteTriggerResponse is a custom error when remote trigger check fails

func (ErrRemoteTriggerResponse) Error

func (err ErrRemoteTriggerResponse) Error() string

Error is a representation of Error interface method

Jump to

Keyboard shortcuts

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