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
This commit is contained in:
commit
0fc0b1032b
2 changed files with 2 additions and 4 deletions
3
scope.go
3
scope.go
|
|
@ -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
|
||||
|
|
|
|||
3
store.go
3
store.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue