Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDigest(name string) ([sha256.Size]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func AssetString(name string) (string, error)
- func BuildExpectedLog(timestamp time.Time, ...) string
- func BuildRequest(method, url, remoteAddr, requestId, forwardedFor string) *http.Request
- func Cert(filename string) string
- func Digests() (map[string][sha256.Size]byte, error)
- func FormatTimeWithDecimalMillis(t time.Time) string
- func GetFreePort() int
- func MustAsset(name string) []byte
- func MustAssetString(name string) string
- func MutualTLSClientConfig() *tls.Config
- func MutualTLSServerConfig() *tls.Config
- func NewQueryEngine() *promql.Engine
- func NewServerRequest(method, uri string, body io.Reader) (*http.Request, error)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func StartGoProcess(importPath string, env []string, args ...string) *gexec.Session
- func WaitForHealthCheck(healthPort string, tlsConfig *tls.Config)
- type AlertManagerSpy
- type Point
- type PromRuleManagersSpy
- func (p *PromRuleManagersSpy) AlertingRules() []*prom_rules.AlertingRule
- func (p *PromRuleManagersSpy) Alertmanagers() []*url.URL
- func (p *PromRuleManagersSpy) Create(managerId string, _ string, _ *prom_config.AlertmanagerConfigs) error
- func (p *PromRuleManagersSpy) Delete(managerId string) error
- func (p *PromRuleManagersSpy) DeleteAll() error
- func (p *PromRuleManagersSpy) DroppedAlertmanagers() []*url.URL
- func (p *PromRuleManagersSpy) ManagerIds() []string
- func (p *PromRuleManagersSpy) Reload() error
- func (p *PromRuleManagersSpy) RuleGroups() []*prom_rules.Group
- type RuleManagerSpy
- func (r *RuleManagerSpy) AddDroppedAlertmanagers(urls []*url.URL)
- func (r *RuleManagerSpy) AlertingRules() []*prom_rules.AlertingRule
- func (r *RuleManagerSpy) Alertmanagers() []*url.URL
- func (r *RuleManagerSpy) CreateManager(managerId string, alertManagers *prom_config.AlertmanagerConfigs) (*rules.Manager, error)
- func (r *RuleManagerSpy) DeleteManager(managerId string) error
- func (r *RuleManagerSpy) DroppedAlertmanagers() []*url.URL
- func (r *RuleManagerSpy) ManagerIds() []string
- func (r *RuleManagerSpy) MethodsCalled() []string
- func (r *RuleManagerSpy) RuleGroupForManager(managerId string) *rulesclient.RuleGroup
- func (r *RuleManagerSpy) RuleGroups() []*prom_rules.Group
- func (r *RuleManagerSpy) UpsertRuleGroup(managerId string, ruleGroup *rulesclient.RuleGroup) error
- type RulesApiError
- type RulesApiHttpError
- type RulesApiResponse
- type RulesApiSpy
- type Series
- type SpyAdapter
- type SpyHistogramObserver
- type SpyLookup
- type SpyMetricRegistrar
- func (r *SpyMetricRegistrar) Add(name string, delta float64, labels ...string)
- func (r *SpyMetricRegistrar) Fetch(name string) func() float64
- func (r *SpyMetricRegistrar) FetchHistogram(name string) func() []float64
- func (r *SpyMetricRegistrar) FetchOption(name string) func() *float64
- func (r *SpyMetricRegistrar) Gatherer() prometheus.Gatherer
- func (r *SpyMetricRegistrar) Histogram(name string) prometheus.Observer
- func (r *SpyMetricRegistrar) Inc(name string, labels ...string)
- func (r *SpyMetricRegistrar) Registerer() prometheus.Registerer
- func (r *SpyMetricRegistrar) Set(name string, value float64, labels ...string)
- type SpyMetricStore
- func (s *SpyMetricStore) GetInternodePoints() []*rpc.Point
- func (s *SpyMetricStore) GetLocalOnlyValues() []bool
- func (s *SpyMetricStore) GetPoints() []*rpc.Point
- func (s *SpyMetricStore) Resume()
- func (s *SpyMetricStore) SetValue(value float64)
- func (s *SpyMetricStore) Start() SpyMetricStoreAddrs
- func (s *SpyMetricStore) Stop()
- type SpyMetricStoreAddrs
- type SpyStorage
- type SpyStore
- type SpyTCPClient
- type SpyTCPListener
- type SpyUAA
- type TempStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDigest ¶ added in v1.4.1
AssetDigest returns the digest of the file with the given name. It returns an error if the asset could not be found or the digest could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"}, AssetDir("data/img") would return []string{"a.png", "b.png"}, AssetDir("foo.txt") and AssetDir("notexist") would return an error, and AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetString ¶ added in v1.4.1
AssetString returns the asset contents as a string (instead of a []byte).
func BuildExpectedLog ¶
func BuildRequest ¶
func GetFreePort ¶
func GetFreePort() int
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func MustAssetString ¶ added in v1.4.1
MustAssetString is like AssetString but panics when Asset would return an error. It simplifies safe initialization of global variables.
func MutualTLSClientConfig ¶
func MutualTLSServerConfig ¶
func NewQueryEngine ¶
func NewServerRequest ¶
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory.
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively.
func StartGoProcess ¶
func WaitForHealthCheck ¶
Types ¶
type AlertManagerSpy ¶
type AlertManagerSpy struct {
// contains filtered or unexported fields
}
func NewAlertManagerSpy ¶
func NewAlertManagerSpy(tlsConfig *tls.Config) *AlertManagerSpy
func (*AlertManagerSpy) Addr ¶
func (a *AlertManagerSpy) Addr() string
func (*AlertManagerSpy) AlertsReceived ¶
func (a *AlertManagerSpy) AlertsReceived() int64
func (*AlertManagerSpy) LastAlertReceived ¶
func (a *AlertManagerSpy) LastAlertReceived() string
func (*AlertManagerSpy) Start ¶
func (a *AlertManagerSpy) Start()
func (*AlertManagerSpy) Stop ¶
func (a *AlertManagerSpy) Stop()
type PromRuleManagersSpy ¶
type PromRuleManagersSpy struct {
// contains filtered or unexported fields
}
func NewPromRuleManagersSpy ¶
func NewPromRuleManagersSpy() *PromRuleManagersSpy
func (*PromRuleManagersSpy) AlertingRules ¶
func (p *PromRuleManagersSpy) AlertingRules() []*prom_rules.AlertingRule
func (*PromRuleManagersSpy) Alertmanagers ¶
func (p *PromRuleManagersSpy) Alertmanagers() []*url.URL
func (*PromRuleManagersSpy) Create ¶
func (p *PromRuleManagersSpy) Create(managerId string, _ string, _ *prom_config.AlertmanagerConfigs) error
func (*PromRuleManagersSpy) Delete ¶
func (p *PromRuleManagersSpy) Delete(managerId string) error
func (*PromRuleManagersSpy) DeleteAll ¶
func (p *PromRuleManagersSpy) DeleteAll() error
func (*PromRuleManagersSpy) DroppedAlertmanagers ¶
func (p *PromRuleManagersSpy) DroppedAlertmanagers() []*url.URL
func (*PromRuleManagersSpy) ManagerIds ¶
func (p *PromRuleManagersSpy) ManagerIds() []string
func (*PromRuleManagersSpy) Reload ¶
func (p *PromRuleManagersSpy) Reload() error
func (*PromRuleManagersSpy) RuleGroups ¶
func (p *PromRuleManagersSpy) RuleGroups() []*prom_rules.Group
type RuleManagerSpy ¶
type RuleManagerSpy struct {
// contains filtered or unexported fields
}
func NewRuleManagerSpy ¶
func NewRuleManagerSpy() *RuleManagerSpy
func (*RuleManagerSpy) AddDroppedAlertmanagers ¶
func (r *RuleManagerSpy) AddDroppedAlertmanagers(urls []*url.URL)
func (*RuleManagerSpy) AlertingRules ¶
func (r *RuleManagerSpy) AlertingRules() []*prom_rules.AlertingRule
func (*RuleManagerSpy) Alertmanagers ¶
func (r *RuleManagerSpy) Alertmanagers() []*url.URL
func (*RuleManagerSpy) CreateManager ¶
func (r *RuleManagerSpy) CreateManager(managerId string, alertManagers *prom_config.AlertmanagerConfigs) (*rules.Manager, error)
func (*RuleManagerSpy) DeleteManager ¶
func (r *RuleManagerSpy) DeleteManager(managerId string) error
func (*RuleManagerSpy) DroppedAlertmanagers ¶
func (r *RuleManagerSpy) DroppedAlertmanagers() []*url.URL
func (*RuleManagerSpy) ManagerIds ¶
func (r *RuleManagerSpy) ManagerIds() []string
func (*RuleManagerSpy) MethodsCalled ¶
func (r *RuleManagerSpy) MethodsCalled() []string
func (*RuleManagerSpy) RuleGroupForManager ¶
func (r *RuleManagerSpy) RuleGroupForManager(managerId string) *rulesclient.RuleGroup
func (*RuleManagerSpy) RuleGroups ¶
func (r *RuleManagerSpy) RuleGroups() []*prom_rules.Group
func (*RuleManagerSpy) UpsertRuleGroup ¶
func (r *RuleManagerSpy) UpsertRuleGroup(managerId string, ruleGroup *rulesclient.RuleGroup) error
type RulesApiError ¶
type RulesApiHttpError ¶
type RulesApiResponse ¶
type RulesApiResponse struct {
Errors []RulesApiError `json:"errors"`
}
type RulesApiSpy ¶
type RulesApiSpy struct {
// contains filtered or unexported fields
}
func NewRulesApiSpy ¶
func NewRulesApiSpy(tlsConfig *tls.Config) (*RulesApiSpy, error)
func (*RulesApiSpy) Addr ¶
func (a *RulesApiSpy) Addr() string
func (*RulesApiSpy) LastRequestPath ¶
func (a *RulesApiSpy) LastRequestPath() string
func (*RulesApiSpy) NextRequestError ¶
func (a *RulesApiSpy) NextRequestError(err *RulesApiHttpError)
func (*RulesApiSpy) RequestsReceived ¶
func (a *RulesApiSpy) RequestsReceived() int
func (*RulesApiSpy) Start ¶
func (a *RulesApiSpy) Start() error
func (*RulesApiSpy) Stop ¶
func (a *RulesApiSpy) Stop()
type Series ¶
func ExplodeSeriesSet ¶
type SpyAdapter ¶
func NewSpyAdapter ¶
func NewSpyAdapter() *SpyAdapter
func (*SpyAdapter) WritePoints ¶
func (s *SpyAdapter) WritePoints(points []*rpc.Point) error
type SpyHistogramObserver ¶
func (*SpyHistogramObserver) Observe ¶
func (s *SpyHistogramObserver) Observe(value float64)
type SpyLookup ¶
type SpyLookup struct { HashKeys []string Results map[string][]int // contains filtered or unexported fields }
func NewSpyLookup ¶
func NewSpyLookup() *SpyLookup
func (*SpyLookup) GetHashKeys ¶
type SpyMetricRegistrar ¶
func NewSpyMetricRegistrar ¶
func NewSpyMetricRegistrar() *SpyMetricRegistrar
func (*SpyMetricRegistrar) Add ¶
func (r *SpyMetricRegistrar) Add(name string, delta float64, labels ...string)
func (*SpyMetricRegistrar) Fetch ¶
func (r *SpyMetricRegistrar) Fetch(name string) func() float64
func (*SpyMetricRegistrar) FetchHistogram ¶
func (r *SpyMetricRegistrar) FetchHistogram(name string) func() []float64
func (*SpyMetricRegistrar) FetchOption ¶
func (r *SpyMetricRegistrar) FetchOption(name string) func() *float64
func (*SpyMetricRegistrar) Gatherer ¶
func (r *SpyMetricRegistrar) Gatherer() prometheus.Gatherer
func (*SpyMetricRegistrar) Histogram ¶
func (r *SpyMetricRegistrar) Histogram(name string) prometheus.Observer
func (*SpyMetricRegistrar) Inc ¶
func (r *SpyMetricRegistrar) Inc(name string, labels ...string)
func (*SpyMetricRegistrar) Registerer ¶
func (r *SpyMetricRegistrar) Registerer() prometheus.Registerer
type SpyMetricStore ¶
type SpyMetricStore struct { QueryError error // contains filtered or unexported fields }
func NewSpyMetricStore ¶
func NewSpyMetricStore(tlsConfig *tls.Config) *SpyMetricStore
func (*SpyMetricStore) GetInternodePoints ¶
func (s *SpyMetricStore) GetInternodePoints() []*rpc.Point
func (*SpyMetricStore) GetLocalOnlyValues ¶
func (s *SpyMetricStore) GetLocalOnlyValues() []bool
func (*SpyMetricStore) GetPoints ¶
func (s *SpyMetricStore) GetPoints() []*rpc.Point
func (*SpyMetricStore) Resume ¶
func (s *SpyMetricStore) Resume()
func (*SpyMetricStore) SetValue ¶
func (s *SpyMetricStore) SetValue(value float64)
func (*SpyMetricStore) Start ¶
func (s *SpyMetricStore) Start() SpyMetricStoreAddrs
func (*SpyMetricStore) Stop ¶
func (s *SpyMetricStore) Stop()
type SpyMetricStoreAddrs ¶
type SpyStorage ¶
type SpyStorage struct {
// contains filtered or unexported fields
}
func NewSpyStorage ¶
func NewSpyStorage(querier storage.Querier) *SpyStorage
func (*SpyStorage) Close ¶
func (s *SpyStorage) Close() error
func (*SpyStorage) StartTime ¶
func (s *SpyStorage) StartTime() (int64, error)
type SpyStore ¶
func NewSpyStoreReader ¶
func NewSpyStoreReader() *SpyStore
func (*SpyStore) LabelNames ¶
type SpyTCPClient ¶
type SpyTCPClient struct {
// contains filtered or unexported fields
}
func NewSpyTCPClient ¶
func NewSpyTCPClient() *SpyTCPClient
func (*SpyTCPClient) GetPoints ¶
func (s *SpyTCPClient) GetPoints() []*rpc.Point
func (*SpyTCPClient) SetErr ¶
func (s *SpyTCPClient) SetErr(err error)
type SpyTCPListener ¶
type SpyTCPListener struct {
// contains filtered or unexported fields
}
func NewSpyTCPListener ¶
func NewSpyTCPListener(tlsConfig *tls.Config) *SpyTCPListener
func (*SpyTCPListener) Address ¶
func (s *SpyTCPListener) Address() string
func (*SpyTCPListener) GetPoints ¶
func (s *SpyTCPListener) GetPoints() []*rpc.Point
func (*SpyTCPListener) Resume ¶
func (s *SpyTCPListener) Resume() error
func (*SpyTCPListener) Start ¶
func (s *SpyTCPListener) Start() error
func (*SpyTCPListener) Stop ¶
func (s *SpyTCPListener) Stop()
type TempStorage ¶
type TempStorage struct {
// contains filtered or unexported fields
}
func NewTempStorage ¶
func NewTempStorage() TempStorage
func (TempStorage) Cleanup ¶
func (s TempStorage) Cleanup()
func (TempStorage) Directories ¶ added in v1.4.0
func (s TempStorage) Directories() []string
func (TempStorage) Directory ¶ added in v1.4.1
func (s TempStorage) Directory(p string) []string
func (TempStorage) FileNames ¶
func (s TempStorage) FileNames() []string
func (TempStorage) Path ¶
func (s TempStorage) Path() string
Source Files ¶
- acceptance.go
- auth.go
- bindata.go
- certificates.go
- file_system.go
- query_engine.go
- series_set.go
- spy_adapter.go
- spy_alertmanager.go
- spy_lookup.go
- spy_metric_registrar.go
- spy_metric_store.go
- spy_prom_rule_managers.go
- spy_rule_manager.go
- spy_rules_api.go
- spy_storage.go
- spy_store.go
- spy_tcp_client.go
- spy_tcp_listener.go
- spy_uaa_client.go
- time.go