Documentation ¶
Index ¶
- func ConvertThresholds(apiv0Thresholds []APIThresholdResponse) []v1.Threshold
- 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)
- func ToIndicatorDocument(d APIDocumentResponse) v1.IndicatorDocument
- type APIAlertResponse
- type APIDocumentResponse
- type APIDocumentSpecResponse
- type APIIndicatorResponse
- type APIIndicatorStatusResponse
- type APILayoutResponse
- type APIMetadataResponse
- type APIPresentationResponse
- type APIProductResponse
- type APISectionResponse
- type APIThresholdResponse
- type APIV0UpdateIndicatorStatus
- type Agent
- type DocumentFinder
- type DocumentStore
- func (d *DocumentStore) AllDocuments() []v1.IndicatorDocument
- func (d *DocumentStore) AllPatches() []indicator.Patch
- func (d *DocumentStore) FilteredDocuments(productName string) []v1.IndicatorDocument
- func (d *DocumentStore) UpsertDocument(doc v1.IndicatorDocument)
- func (d *DocumentStore) UpsertPatches(patchList PatchList)
- type PatchList
- type RegistryApiClient
- type WebServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertThresholds ¶ added in v0.7.11
func ConvertThresholds(apiv0Thresholds []APIThresholdResponse) []v1.Threshold
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)
func ToIndicatorDocument ¶
func ToIndicatorDocument(d APIDocumentResponse) v1.IndicatorDocument
Types ¶
type APIAlertResponse ¶ added in v0.7.15
type APIDocumentResponse ¶ added in v0.7.15
type APIDocumentResponse struct { APIVersion string `json:"apiVersion"` UID string `json:"uid"` Kind string `json:"kind"` Metadata APIMetadataResponse `json:"metadata"` Spec APIDocumentSpecResponse `json:"spec"` }
func ToAPIDocumentResponse ¶ added in v0.7.15
func ToAPIDocumentResponse(doc v1.IndicatorDocument) APIDocumentResponse
type APIDocumentSpecResponse ¶ added in v0.7.15
type APIDocumentSpecResponse struct { Product APIProductResponse `json:"product"` Indicators []APIIndicatorResponse `json:"indicators"` Layout APILayoutResponse `json:"layout"` }
type APIIndicatorResponse ¶ added in v0.7.15
type APIIndicatorResponse struct { Name string `json:"name"` Type string `json:"type"` PromQL string `json:"promql"` Thresholds []APIThresholdResponse `json:"thresholds"` Alert APIAlertResponse `json:"alert"` Documentation map[string]string `json:"documentation,omitempty"` Presentation APIPresentationResponse `json:"presentation"` Status *APIIndicatorStatusResponse `json:"status"` }
type APIIndicatorStatusResponse ¶ added in v0.7.15
type APILayoutResponse ¶ added in v0.7.15
type APILayoutResponse struct { Title string `json:"title"` Description string `json:"description"` Sections []APISectionResponse `json:"sections"` Owner string `json:"owner"` }
type APIMetadataResponse ¶ added in v0.7.15
type APIPresentationResponse ¶ added in v0.7.15
type APIProductResponse ¶ added in v0.7.15
type APISectionResponse ¶ added in v0.7.15
type APIThresholdResponse ¶ added in v0.7.15
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() []v1.IndicatorDocument
func (*DocumentStore) AllPatches ¶
func (d *DocumentStore) AllPatches() []indicator.Patch
func (*DocumentStore) FilteredDocuments ¶ added in v0.7.15
func (d *DocumentStore) FilteredDocuments(productName string) []v1.IndicatorDocument
func (*DocumentStore) UpsertDocument ¶
func (d *DocumentStore) UpsertDocument(doc v1.IndicatorDocument)
func (*DocumentStore) UpsertPatches ¶
func (d *DocumentStore) UpsertPatches(patchList PatchList)
type RegistryApiClient ¶ added in v0.7.15
type RegistryApiClient struct {
// contains filtered or unexported fields
}
func NewAPIClient ¶
func NewAPIClient(serverURL string, client *http.Client) *RegistryApiClient
func (*RegistryApiClient) BulkStatusUpdate ¶ added in v0.7.15
func (c *RegistryApiClient) BulkStatusUpdate(statusUpdates []APIV0UpdateIndicatorStatus, documentId string) error
func (*RegistryApiClient) IndicatorDocuments ¶ added in v0.7.15
func (c *RegistryApiClient) IndicatorDocuments() ([]APIDocumentResponse, error)
type WebServerConfig ¶
type WebServerConfig struct { Address string DocumentStore *DocumentStore StatusStore *status_store.Store }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.