[agent/codex:gpt-5.4-mini] Read docs/RFC-STORE.md and docs/specs/core/go/RFC.md fully. ... #176

Merged
Virgil merged 1 commit from agent/read-docs-rfc-store-md-and-docs-specs-co into dev 2026-04-04 20:46:51 +00:00
3 changed files with 8 additions and 4 deletions

4
doc.go
View file

@ -2,7 +2,9 @@
// namespace isolation, quota enforcement, reactive events, journal writes,
// workspace buffering, cold archive compaction, and orphan recovery.
//
// Prefer struct literals when the configuration is already known:
// Prefer `store.NewConfigured(store.StoreConfig{...})` and
// `store.NewScopedConfigured(store.ScopedStoreConfig{...})` when the
// configuration is already known:
//
// configuredStore, err := store.NewConfigured(store.StoreConfig{
// DatabasePath: ":memory:",

View file

@ -83,6 +83,8 @@ type scopedWatcherBridge struct {
// NewScoped validates a namespace and prefixes groups with namespace + ":".
// Usage example: `scopedStore, err := store.NewScoped(storeInstance, "tenant-a"); if err != nil { return }`
// Prefer `NewScopedConfigured` when the namespace and quota are already known
// as a struct literal.
func NewScoped(storeInstance *Store, namespace string) (*ScopedStore, error) {
if storeInstance == nil {
return nil, core.E("store.NewScoped", "store instance is nil", nil)

View file

@ -29,9 +29,9 @@ const (
)
// Usage example: `storeInstance, err := store.NewConfigured(store.StoreConfig{DatabasePath: "/tmp/go-store.db", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}, PurgeInterval: 30 * time.Second})`
// Prefer `store.NewConfigured(store.StoreConfig{...})` when the configuration
// is already known as a struct literal. Use `StoreOption` only when values
// need to be assembled incrementally, such as when a caller receives them from
// Prefer `store.NewConfigured(store.StoreConfig{...})` when the full
// configuration is already known. Use `StoreOption` only when values need to
// be assembled incrementally, such as when a caller receives them from
// different sources.
type StoreOption func(*StoreConfig)