Documentation ¶
Overview ¶
Code generated for package testing by go-bindata DO NOT EDIT. (@generated) sources: certs/metric-store-ca.crl certs/metric-store-ca.crt certs/metric-store-ca.key certs/metric-store.crt certs/metric-store.csr certs/metric-store.key
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func BuildExpectedLog(timestamp time.Time, ...) string
- func BuildRequest(method, url, remoteAddr, requestId, forwardedFor string) *http.Request
- func Cert(filename string) string
- func FormatTimeWithDecimalMillis(t time.Time) string
- func GetFreePort() int
- func MustAsset(name string) []byte
- 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 SkipTestOnMac()
- func StartGoProcess(importPath string, env []string, args ...string) *gexec.Session
- func WaitForHealthCheck(profilingAddr string, tlsConfig *tls.Config)
- type AlertManagerSpy
- type MockAuthClient
- 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 ScrapeTargetSpy
- type Series
- type SpyAdapter
- type SpyAppender
- 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, labels ...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) Addr() string
- 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 SpyQueue
- func (spy *SpyQueue) Advance() error
- func (spy *SpyQueue) Append(_ []byte) error
- func (spy *SpyQueue) Close() error
- func (spy *SpyQueue) Current() ([]byte, error)
- func (spy *SpyQueue) DiskUsage() int64
- func (spy *SpyQueue) Open() error
- func (spy *SpyQueue) PurgeOlderThan(_ time.Time) error
- func (spy *SpyQueue) SetMaxSegmentSize(size int64) error
- type SpyStorage
- 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 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 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 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 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 SkipTestOnMac ¶ added in v1.4.3
func SkipTestOnMac()
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 MockAuthClient ¶ added in v1.4.3
func (*MockAuthClient) GetAuthHeader ¶ added in v1.4.3
func (m *MockAuthClient) GetAuthHeader() (string, error)
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 ScrapeTargetSpy ¶ added in v1.4.3
type ScrapeTargetSpy struct {
// contains filtered or unexported fields
}
func NewScrapeTargetSpy ¶ added in v1.4.3
func NewScrapeTargetSpy(tlsConfig *tls.Config) *ScrapeTargetSpy
func (*ScrapeTargetSpy) Addr ¶ added in v1.4.3
func (spy *ScrapeTargetSpy) Addr() string
func (*ScrapeTargetSpy) ScrapesReceived ¶ added in v1.4.3
func (spy *ScrapeTargetSpy) ScrapesReceived() int32
func (*ScrapeTargetSpy) Start ¶ added in v1.4.3
func (spy *ScrapeTargetSpy) Start()
func (*ScrapeTargetSpy) Stop ¶ added in v1.4.3
func (spy *ScrapeTargetSpy) Stop()
type Series ¶
func ExplodeSeriesSet ¶
type SpyAdapter ¶
func NewSpyAdapter ¶
func NewSpyAdapter() *SpyAdapter
func (*SpyAdapter) WritePoints ¶
func (s *SpyAdapter) WritePoints(points []*rpc.Point) error
type SpyAppender ¶ added in v1.4.3
type SpyAppender struct { }
func (SpyAppender) AddFast ¶ added in v1.4.3
func (s SpyAppender) AddFast(ref uint64, t int64, v float64) error
func (SpyAppender) Commit ¶ added in v1.4.3
func (s SpyAppender) Commit() error
func (SpyAppender) Rollback ¶ added in v1.4.3
func (s SpyAppender) Rollback() 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, labels ...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 { ReloadRequestsCount atomic.Int32 QueryError error // contains filtered or unexported fields }
func NewSpyMetricStore ¶
func NewSpyMetricStore(tlsConfig *tls.Config) *SpyMetricStore
func (*SpyMetricStore) Addr ¶ added in v1.4.3
func (s *SpyMetricStore) Addr() string
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 SpyQueue ¶ added in v1.4.4
func NewSpyQueue ¶ added in v1.4.4
func (*SpyQueue) PurgeOlderThan ¶ added in v1.4.4
func (*SpyQueue) SetMaxSegmentSize ¶ added in v1.4.4
type SpyStorage ¶
type SpyStorage struct {
// contains filtered or unexported fields
}
func NewSpyStorage ¶
func NewSpyStorage(querier storage.Querier) *SpyStorage
func (*SpyStorage) Appender ¶
func (s *SpyStorage) Appender() storage.Appender
func (*SpyStorage) Close ¶
func (s *SpyStorage) Close() error
func (*SpyStorage) StartTime ¶
func (s *SpyStorage) StartTime() (int64, error)
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(name string) TempStorage
func (TempStorage) Cleanup ¶
func (s TempStorage) Cleanup()
func (TempStorage) CreateFile ¶ added in v1.4.3
func (s TempStorage) CreateFile(name string, content []byte) string
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
- mock_auth_client.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_queue.go
- spy_rule_manager.go
- spy_rules_api.go
- spy_scrape_target.go
- spy_storage.go
- spy_tcp_client.go
- spy_tcp_listener.go
- spy_uaa_client.go
- time.go