go-store/doc.go
Virgil ead99906de
All checks were successful
Security Scan / security (push) Successful in 10s
Test / test (push) Successful in 1m41s
refactor(store): tighten AX event naming and examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 16:07:53 +00:00

18 lines
843 B
Go

// Package store provides a SQLite-backed key-value store with group namespaces,
// TTL expiry, quota-enforced scoped views, and reactive change notifications.
//
// Usage example:
//
// storeInstance, _ := store.New(":memory:")
// defer storeInstance.Close()
// storeInstance.Set("config", "theme", "dark")
// themeValue, _ := storeInstance.Get("config", "theme")
// scopedStore, _ := store.NewScoped(storeInstance, "tenant-a")
// _ = scopedStore.Set("config", "theme", "dark")
// quotaScopedStore, _ := store.NewScopedWithQuota(storeInstance, "tenant-b", store.QuotaConfig{MaxKeys: 100, MaxGroups: 10})
// _ = quotaScopedStore.Set("prefs", "locale", "en-GB")
//
// Use New to open a store, then Set/Get for CRUD operations. Use
// NewScoped/NewScopedWithQuota when group names need tenant isolation or
// per-namespace quotas.
package store