Documentation
¶
Index ¶
- func DebugNotifyFunc(logger log.Logger) rules.NotifyFunc
- func HTTPNotifyFunc(logger log.Logger, token string, url string, retries int) rules.NotifyFunc
- func HTTPQueryFunc(logger log.Logger, url string) rules.QueryFunc
- func NewMockStorage() (storage.Storage, error)
- type Alert
- type Config
- type M
- type Manager
- type MockStorage
- type Prom
- type PromRules
- type PromsResp
- type Reloader
- type Rule
- type Rules
- type RulesResp
- type S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPNotifyFunc ¶
HTTPNotifyFunc
func HTTPQueryFunc ¶
HTTPQueryFunc TODO: use http keep-alive
func NewMockStorage ¶
NewMockStorage create temporary storage
Types ¶
type Config ¶
type Config struct {
NotifyReties int
GatewayURL string
GatewayPathRule string
GatewayPathProm string
GatewayPathNotify string
EvaluationInterval model.Duration
ReloadInterval model.Duration
AuthToken string
PromlogConfig promlog.Config
}
Config ...
type Manager ¶
type Manager struct {
Config Config
Prom Prom
Options *rules.ManagerOptions
Manager *rules.Manager
Rules Rules
// contains filtered or unexported fields
}
Manager ...
func NewManager ¶
NewManager ...
type MockStorage ¶
MockStorage temporary storage
func (MockStorage) Close ¶
func (s MockStorage) Close() error
Close delete temporary files when closed
type Rule ¶
type Rule struct {
ID int64 `json:"id"`
PromID int64 `json:"prom_id"`
Expr string `json:"expr"`
Op string `json:"op"`
Value string `json:"value"`
For string `json:"for"`
Labels map[string]string `json:"labels"`
Summary string `json:"summary"`
Description string `json:"description"`
}
Rule ...
Click to show internal directories.
Click to hide internal directories.