Documentation
¶
Index ¶
- func NewIndicatorDocumentsHandler(store *DocumentStore) http.HandlerFunc
- func NewRegisterHandler(store *DocumentStore) http.HandlerFunc
- func NewWebServer(c WebServerConfig) (func() error, func() error, error)
- func ToIndicatorDocument(d APIV0Document) indicator.Document
- type APIClient
- type APIV0Alert
- type APIV0Document
- type APIV0Indicator
- type APIV0Layout
- type APIV0Presentation
- type APIV0Product
- type APIV0Section
- type APIV0Threshold
- type Agent
- type DocumentFinder
- type DocumentStore
- type PatchList
- type WebServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIndicatorDocumentsHandler ¶
func NewIndicatorDocumentsHandler(store *DocumentStore) http.HandlerFunc
func NewRegisterHandler ¶
func NewRegisterHandler(store *DocumentStore) http.HandlerFunc
func NewWebServer ¶
func NewWebServer(c WebServerConfig) (func() error, func() error, error)
func ToIndicatorDocument ¶
func ToIndicatorDocument(d APIV0Document) indicator.Document
Types ¶
type APIClient ¶
type APIClient interface {
IndicatorDocuments() ([]APIV0Document, error)
}
type APIV0Alert ¶
type APIV0Document ¶
type APIV0Document struct {
APIVersion string `json:"apiVersion"`
Product APIV0Product `json:"product"`
Metadata map[string]string `json:"metadata"`
Indicators []APIV0Indicator `json:"indicators"`
Layout APIV0Layout `json:"layout"`
}
func ToAPIV0Document ¶
func ToAPIV0Document(doc indicator.Document) APIV0Document
type APIV0Indicator ¶
type APIV0Indicator struct {
Name string `json:"name"`
PromQL string `json:"promql"`
Thresholds []APIV0Threshold `json:"thresholds"`
Alert APIV0Alert `json:"alert"`
Documentation map[string]string `json:"documentation,omitempty"`
Presentation *APIV0Presentation `json:"presentation"`
}
type APIV0Layout ¶
type APIV0Layout struct {
Title string `json:"title"`
Description string `json:"description"`
Sections []APIV0Section `json:"sections"`
Owner string `json:"owner"`
}
type APIV0Presentation ¶
type APIV0Product ¶
type APIV0Section ¶
type APIV0Threshold ¶
type Agent ¶
type DocumentFinder ¶
type DocumentFinder struct {
Glob string
}
func (DocumentFinder) FindAll ¶
func (df DocumentFinder) FindAll() ([]document, error)
type DocumentStore ¶
func NewDocumentStore ¶
func NewDocumentStore(timeout time.Duration) *DocumentStore
func (*DocumentStore) AllDocuments ¶
func (d *DocumentStore) AllDocuments() []indicator.Document
func (*DocumentStore) AllPatches ¶
func (d *DocumentStore) AllPatches() []indicator.Patch
func (*DocumentStore) UpsertDocument ¶
func (d *DocumentStore) UpsertDocument(doc indicator.Document)
func (*DocumentStore) UpsertPatches ¶
func (d *DocumentStore) UpsertPatches(patchList PatchList)
type WebServerConfig ¶
type WebServerConfig struct {
Address string
ServerPEMPath string
ServerKeyPath string
RootCAPath string
*DocumentStore
}
Click to show internal directories.
Click to hide internal directories.