Versions in this module Expand all Collapse all v0 v0.20.2 Mar 16, 2020 Changes in this version + func AmtoolOk() (bool, error) + func At(ts float64) float64 + func CompareCollectors(a, b *Collector, opts *AcceptanceOpts) (bool, error) + func Version() (string, error) + type AcceptanceOpts struct + RoutePrefix string + Tolerance time.Duration + type AcceptanceTest struct + func NewAcceptanceTest(t *testing.T, opts *AcceptanceOpts) *AcceptanceTest + func (t *AcceptanceTest) AlertmanagerCluster(conf string, size int) *AlertmanagerCluster + func (t *AcceptanceTest) Collector(name string) *Collector + func (t *AcceptanceTest) Do(at float64, f func()) + func (t *AcceptanceTest) Run() + type Alertmanager struct + func (am *Alertmanager) AddAlerts(alerts ...*TestAlert) + func (am *Alertmanager) AddAlertsAt(at float64, alerts ...*TestAlert) + func (am *Alertmanager) DelSilence(at float64, sil *TestSilence) + func (am *Alertmanager) QueryAlerts() ([]TestAlert, error) + func (am *Alertmanager) QuerySilence() ([]TestSilence, error) + func (am *Alertmanager) Reload() + func (am *Alertmanager) SetSilence(at float64, sil *TestSilence) + func (am *Alertmanager) Start(additionalArg []string) error + func (am *Alertmanager) Terminate() + func (am *Alertmanager) UpdateConfig(conf string) + func (am *Alertmanager) WaitForCluster(size int) error + type AlertmanagerCluster struct + func (amc *AlertmanagerCluster) DelSilence(at float64, sil *TestSilence) + func (amc *AlertmanagerCluster) Members() []*Alertmanager + func (amc *AlertmanagerCluster) Reload() + func (amc *AlertmanagerCluster) SetSilence(at float64, sil *TestSilence) + func (amc *AlertmanagerCluster) Start() error + func (amc *AlertmanagerCluster) Terminate() + func (amc *AlertmanagerCluster) UpdateConfig(conf string) + type Collector struct + func (c *Collector) Check() string + func (c *Collector) Collected() map[float64][]models.GettableAlerts + func (c *Collector) String() string + func (c *Collector) Want(iv Interval, alerts ...*TestAlert) + type Interval struct + func Between(start, end float64) Interval + func (iv Interval) String() string + type MockWebhook struct + Func func(timestamp float64) bool + func NewWebhook(c *Collector) *MockWebhook + func (ws *MockWebhook) Address() string + func (ws *MockWebhook) ServeHTTP(w http.ResponseWriter, req *http.Request) + type TestAlert struct + func Alert(keyval ...interface{}) *TestAlert + func (a *TestAlert) Active(tss ...float64) *TestAlert + func (a *TestAlert) Annotate(keyval ...interface{}) *TestAlert + type TestSilence struct + func Silence(start, end float64) *TestSilence + func (s *TestSilence) Comment(c string) *TestSilence + func (s *TestSilence) ID() string + func (s *TestSilence) Match(v ...string) *TestSilence + func (s *TestSilence) MatchRE(v ...string) *TestSilence + func (s *TestSilence) SetID(ID string)