Merge pull request '[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d...' (#133) from agent/read---spec-code-core-go-store-rfc-md-fu into dev
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

This commit is contained in:
Virgil 2026-04-04 11:33:47 +00:00
commit 0fc0b1032b
2 changed files with 2 additions and 4 deletions

View file

@ -22,10 +22,9 @@ type QuotaConfig struct {
MaxGroups int
}
// Usage example: `scopedStore := store.NewScoped(storeInstance, "tenant-a"); if scopedStore == nil { return }; if err := scopedStore.Set("colour", "blue"); err != nil { return }; if err := scopedStore.SetIn("config", "language", "en-GB"); err != nil { return }`
// ScopedStore keeps one namespace isolated behind helpers such as Set and
// GetFrom so callers do not repeat the `tenant-a:` prefix manually.
//
// Usage example: `scopedStore := store.NewScoped(storeInstance, "tenant-a"); if scopedStore == nil { return }; if err := scopedStore.Set("colour", "blue"); err != nil { return }; if err := scopedStore.SetIn("config", "language", "en-GB"); err != nil { return }`
type ScopedStore struct {
backingStore *Store
namespace string

View file

@ -94,10 +94,9 @@ func (journalConfig journalConfiguration) isConfigured() bool {
journalConfig.bucketName != ""
}
// Usage example: `storeInstance, err := store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}, PurgeInterval: 30 * time.Second})`
// Store keeps grouped key-value entries in SQLite and can also write completed
// work summaries to the journal table.
//
// Usage example: `storeInstance, err := store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}, PurgeInterval: 30 * time.Second})`
type Store struct {
sqliteDatabase *sql.DB
databasePath string