Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProvider ¶
func RegisterProvider(name string, constructor ProviderConstructor) error
RegisterProvider adds an alert provider constructor.
Types ¶
type Provider ¶
type Provider interface {
// Query returns alerts that match the AlertQuery filter.
Query(ctx context.Context, query schema.AlertQuery) ([]schema.Alert, error)
// Get returns a single alert by its normalized ID. Providers that cannot
// retrieve alerts by ID (e.g., ephemeral alerts) may return an error.
Get(ctx context.Context, id string) (schema.Alert, error)
}
Provider defines the capability surface an alert adapter must satisfy.
Alerts in OpsOrch are read-only signals: adapters map upstream alerts into the normalized schema.Alert shape. Providers do NOT support create/update.
type ProviderConstructor ¶
ProviderConstructor builds a Provider instance from decrypted config.
func LookupProvider ¶
func LookupProvider(name string) (ProviderConstructor, bool)
LookupProvider returns a named alert provider constructor if registered.
Click to show internal directories.
Click to hide internal directories.