Documentation
¶
Overview ¶
Package store stands in for an infra package (pkg/backplane/infra/postgres, infra/valkey): a config section plus a deps.Provider built from it. The service embeds the section in its Config and passes it to New explicitly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrScheme is returned for a DSN the store cannot open. ErrScheme = errors.New("store: only mem:// is supported") // ErrDown is what the probe reports while Config.Down is set. ErrDown = errors.New("store: down") )
Errors.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Connection string; never printed.
DSN config.Secret `json:"dsn" schemapb:"default=mem://"`
// Requests slower than this are logged; changed live from the console.
SlowLog config.Live[time.Duration] `json:"slow_log" schemapb:"default=100ms"`
// Makes the probe fail, as an outage would: a required store takes the
// instance out of readiness, an optional one (ProbeOptional) disappears
// from Get. Changed live from the console.
Down config.Live[bool] `json:"down" schemapb:"default=false"`
}
Config of one store.
Click to show internal directories.
Click to hide internal directories.