Documentation ¶
Index ¶
- type API
- type APIImpl
- func (a *APIImpl) AckAlert(ctx context.Context, alertID string, alertAck model.AlertAcknowledgement) error
- func (a *APIImpl) GetAlerts(ctx context.Context, q query.AlertQuery) ([]model.Alert, error)
- func (a *APIImpl) GetClusterStatus(ctx context.Context) ([]any, error)
- func (a *APIImpl) GetSilences(ctx context.Context, q query.SilenceQuery) ([]model.Silence, error)
- func (a *APIImpl) PostAlerts(ctx context.Context, alerts []model.Alert) error
- func (a *APIImpl) PostSilence(ctx context.Context, silence model.Silence) error
- func (a *APIImpl) QueryAlertStats(ctx context.Context, q query.AlertStatsQuery) ([]query.StatsResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { // GetAlerts returns a list of alerts matching the given query. GetAlerts(ctx context.Context, q query.AlertQuery) ([]model.Alert, error) // PostAlerts stores the given alerts in the database, updating any existing alerts with the same labels. PostAlerts(ctx context.Context, alerts []model.Alert) error // QueryAlertStats executes the given stats query, returning the resulting frames. QueryAlertStats(ctx context.Context, q query.AlertStatsQuery) ([]query.StatsResult, error) // GetSilences returns a list of silences matching the given query. GetSilences(ctx context.Context, query query.SilenceQuery) ([]model.Silence, error) // PostSilences stores the given silences in the database, updating any existing silences with the same ID. PostSilence(ctx context.Context, silences model.Silence) error // AckAlert acknowledges the given alert with the given acknowledgement. AckAlert(ctx context.Context, alertID string, alertAck model.AlertAcknowledgement) error // GetClusterStatus returns the status of the nodes in the cluster. GetClusterStatus(ctx context.Context) ([]any, error) }
API defines an interface that represents all the operations that can be performed on the kiora API.
type APIImpl ¶
type APIImpl struct {
// contains filtered or unexported fields
}
func NewAPIImpl ¶
func NewAPIImpl(bus services.Bus, clusterer clustering.Clusterer) *APIImpl
func (*APIImpl) GetClusterStatus ¶
func (*APIImpl) GetSilences ¶
func (*APIImpl) PostAlerts ¶
func (*APIImpl) PostSilence ¶
func (*APIImpl) QueryAlertStats ¶
func (a *APIImpl) QueryAlertStats(ctx context.Context, q query.AlertStatsQuery) ([]query.StatsResult, error)
Directories ¶
Path | Synopsis |
---|---|
Package apiv1 provides primitives to interact with the openapi HTTP API.
|
Package apiv1 provides primitives to interact with the openapi HTTP API. |
Click to show internal directories.
Click to hide internal directories.