Documentation ¶
Index ¶
- func ConvertThresholds(apiv0Thresholds []APIV0Threshold) []indicator.Threshold
- func NewAPIClient(serverURL string, client *http.Client) *apiClient
- func NewIndicatorDocumentsHandler(store *DocumentStore, statusStore *status_store.Store) http.HandlerFunc
- func NewIndicatorStatusBulkUpdateHandler(store *status_store.Store) http.HandlerFunc
- func NewRegisterHandler(store *DocumentStore) http.HandlerFunc
- func NewWebServer(c WebServerConfig) (func() error, func() error, error)
- func ToIndicatorDocument(d APIV0Document) indicator.Document
- type APIV0Alert
- type APIV0Document
- type APIV0Indicator
- type APIV0IndicatorStatus
- type APIV0Layout
- type APIV0Presentation
- type APIV0Product
- type APIV0Section
- type APIV0ServiceLevel
- type APIV0Threshold
- type APIV0UpdateIndicatorStatus
- type Agent
- type DocumentFinder
- type DocumentStore
- type PatchList
- type WebServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertThresholds ¶ added in v0.7.11
func ConvertThresholds(apiv0Thresholds []APIV0Threshold) []indicator.Threshold
func NewAPIClient ¶
func NewIndicatorDocumentsHandler ¶
func NewIndicatorDocumentsHandler(store *DocumentStore, statusStore *status_store.Store) http.HandlerFunc
func NewIndicatorStatusBulkUpdateHandler ¶ added in v0.7.10
func NewIndicatorStatusBulkUpdateHandler(store *status_store.Store) 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 APIV0Alert ¶
type APIV0Document ¶
type APIV0Document struct { APIVersion string `json:"apiVersion"` UID string `json:"uid"` 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, getStatus func(string) *APIV0IndicatorStatus) APIV0Document
type APIV0Indicator ¶
type APIV0Indicator struct { Name string `json:"name"` PromQL string `json:"promql"` Thresholds []APIV0Threshold `json:"thresholds"` Alert APIV0Alert `json:"alert"` ServiceLevel *APIV0ServiceLevel `json:"serviceLevel"` Documentation map[string]string `json:"documentation,omitempty"` Presentation APIV0Presentation `json:"presentation"` Status *APIV0IndicatorStatus `json:"status"` }
type APIV0IndicatorStatus ¶ added in v0.7.10
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 APIV0ServiceLevel ¶ added in v0.7.11
type APIV0ServiceLevel struct {
Objective float64 `json:"objective"`
}
type APIV0Threshold ¶
type APIV0UpdateIndicatorStatus ¶ added in v0.7.10
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, c clock) *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 *DocumentStore StatusStore *status_store.Store }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.