Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Noop ¶
type Noop struct{}
Noop is an implementation of the Merger interface which does not actually merge responses, but just returns an arbitrary response(the first in the list). It can be used for write requests where the response is either empty or inconsequential.
type V2AlertGroups ¶ added in v1.10.0
type V2AlertGroups struct{}
V2AlertGroups implements the Merger interface for GET /v2/alerts/groups. It returns the union of alert groups over all the responses. When the same alert exists in the same group for multiple responses, the instance of that alert with the most recent UpdatedAt timestamp is returned in that group within the response.
func (V2AlertGroups) MergeResponses ¶ added in v1.10.0
func (V2AlertGroups) MergeResponses(in [][]byte) ([]byte, error)
type V2Alerts ¶ added in v1.10.0
type V2Alerts struct{}
V2Alerts implements the Merger interface for GET /v2/alerts. It returns the union of alerts over all the responses. When the same alert exists in multiple responses, the instance of that alert with the most recent UpdatedAt timestamp is returned in the response.
type V2SilenceID ¶ added in v1.10.0
type V2SilenceID struct{}
V2SilenceID implements the Merger interface for GET /v2/silence/{id}. It returns the most recently updated silence (newest UpdatedAt timestamp).
func (V2SilenceID) MergeResponses ¶ added in v1.10.0
func (V2SilenceID) MergeResponses(in [][]byte) ([]byte, error)
type V2Silences ¶ added in v1.10.0
type V2Silences struct{}
V2Silences implements the Merger interface for GET /v2/silences. It returns the union of silences over all the responses. When a silence with the same ID exists in multiple responses, the silence most recently updated silence is returned (newest UpdatedAt timestamp).
func (V2Silences) MergeResponses ¶ added in v1.10.0
func (V2Silences) MergeResponses(in [][]byte) ([]byte, error)