Documentation
¶
Overview ¶
Package dbintegrations is the registry driven catalog of per database integration cards and the provider contract that reports their status.
Index ¶
Constants ¶
const AllEngines = "*"
AllEngines in a card's engine list means every engine.
Variables ¶
var ErrReadOnly = errors.New("dbintegrations: provider is read only")
ErrReadOnly is returned by providers that only report status.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct {
ID string `yaml:"id" json:"id"`
Category Category `yaml:"category" json:"category"`
Title string `yaml:"title" json:"title"`
Summary string `yaml:"summary" json:"summary"`
Engines []string `yaml:"engines" json:"engines"`
Kind Kind `yaml:"kind" json:"kind"`
Docs string `yaml:"docs" json:"docs"`
DocsPlanned bool `yaml:"docs_planned" json:"docs_planned"`
StatusSource string `yaml:"status_source" json:"-"`
Notes string `yaml:"notes" json:"-"`
Featured bool `yaml:"featured" json:"featured"`
}
Card is one registry entry.
func (Card) ExportKinds ¶
ExportKinds returns the dataexport kinds a dataexport:<kinds> status source names.
func (Card) SupportsEngine ¶
SupportsEngine reports whether the card applies to engine.
type CardStatus ¶
CardStatus is one catalog card with its state for one database.
type Config ¶
type Config struct {
Settings map[string]string `json:"settings,omitempty"`
Secrets map[string]SecretRef `json:"secrets,omitempty"`
}
Config is the input of Configure: plain settings plus secrets by reference.
type DestinationLister ¶
type DestinationLister interface {
List(ctx context.Context) ([]store.ExportDestination, error)
}
DestinationLister is the slice of internal/dataexport the read only export providers need; *dataexport.Service satisfies it.
type Provider ¶
type Provider interface {
ID() string
Status(ctx context.Context, db Database) (State, error)
Configure(ctx context.Context, db Database, cfg Config) error
}
Provider derives a card's status and, when it is a writable connector, applies its configuration.
func NewDatadogProvider ¶
func NewDatadogProvider(src DestinationLister) Provider
NewDatadogProvider reports whether a Datadog export covers the database.
func NewOpenTelemetryProvider ¶
func NewOpenTelemetryProvider(src DestinationLister) Provider
NewOpenTelemetryProvider reports whether an OTLP export covers the database.
type SecretRef ¶
type SecretRef struct {
Name string `json:"name"`
}
SecretRef points at a stored secret by name, so a config never holds a value.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service joins the registry with the registered providers.
func NewService ¶
NewService builds a service from providers keyed by their ID.