Documentation
¶
Overview ¶
Package store provides a configuration-driven registry for logical stores. Logical stores reference physical backends from store/storage and can expose scoped views such as prefixed KV stores.
Index ¶
- Constants
- type Config
- type ConfigError
- type Stores
- func (r *Stores) Close() error
- func (r *Stores) KV(name string) (kv.Store, error)
- func (r *Stores) Log(name string) (logstore.Store, error)
- func (r *Stores) Metrics(name string) (metrics.Store, error)
- func (r *Stores) ObjectStore(name string) (objectstore.ObjectStore, error)
- func (r *Stores) SQL(name string) (*sqlx.DB, error)
- func (r *Stores) TTL(name string) (time.Duration, error)
Constants ¶
const ( KindKeyValue = "keyvalue" KindMetrics = "metrics" KindLog = "log" KindObjectStore = "objectstore" KindSQL = "sql" )
Kind constants for logical store categories.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Kind string
Storage string // reference to a physical storage backend
Prefix string // logical key prefix; SQL KV uses one segment as its table name
Database string
Table string
TopicID string
TTL time.Duration
}
Config describes one logical Store entry. Serialization belongs to callers.
stores:
peers:
kind: keyvalue
storage: main-kv
prefix: peers
type ConfigError ¶
ConfigError identifies the logical Store entry whose construction failed.
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
Error preserves the underlying construction error text.
func (*ConfigError) Unwrap ¶
func (e *ConfigError) Unwrap() error
Unwrap exposes the underlying construction error.
type Stores ¶
type Stores struct {
// contains filtered or unexported fields
}
Stores holds named logical store instances created eagerly by New.
func New ¶
New creates logical stores on top of already-opened physical storage backends. TiKV roots start a bounded expiration worker owned by Stores; Close cancels and joins it. The caller owns the physical storage lifecycle and must close Stores before Storage.
func (*Stores) ObjectStore ¶
func (r *Stores) ObjectStore(name string) (objectstore.ObjectStore, error)
ObjectStore returns the named objectstore.ObjectStore.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package kv provides a key-value store interface with hierarchical path-based keys.
|
Package kv provides a key-value store interface with hierarchical path-based keys. |
|
Package logstore defines structured records and queries for logging services.
|
Package logstore defines structured records and queries for logging services. |
|
Package memory defines provider-neutral facts and ordered conversation history.
|
Package memory defines provider-neutral facts and ordered conversation history. |
|
Package metrics defines a business-neutral store for numeric time series samples.
|
Package metrics defines a business-neutral store for numeric time series samples. |
|
Package objectstore defines a generic object storage abstraction.
|
Package objectstore defines a generic object storage abstraction. |
|
Package sqlmeta validates SQL Store tables and metadata on borrowed pools.
|
Package sqlmeta validates SQL Store tables and metadata on borrowed pools. |
|
Package storage provides a configuration-driven registry for physical storage backends.
|
Package storage provides a configuration-driven registry for physical storage backends. |
|
Package vecid assigns stable string IDs to embedding vectors via online nearest-centroid matching and offline DBSCAN re-clustering.
|
Package vecid assigns stable string IDs to embedding vectors via online nearest-centroid matching and offline DBSCAN re-clustering. |
|
Package vecstore provides a vector approximate nearest-neighbor (ANN) search interface and implementations.
|
Package vecstore provides a vector approximate nearest-neighbor (ANN) search interface and implementations. |