[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #50
3 changed files with 9 additions and 0 deletions
|
|
@ -163,6 +163,9 @@ func (storeInstance *Store) queryJournalFlux(flux string) (string, []any, error)
|
|||
}
|
||||
|
||||
func (storeInstance *Store) journalBucket() string {
|
||||
if storeInstance.bucket != "" {
|
||||
return storeInstance.bucket
|
||||
}
|
||||
if storeInstance.journal.bucketName == "" {
|
||||
return defaultJournalBucket
|
||||
}
|
||||
|
|
|
|||
4
store.go
4
store.go
|
|
@ -45,6 +45,8 @@ type Store struct {
|
|||
purgeWaitGroup sync.WaitGroup
|
||||
purgeInterval time.Duration // interval between background purge cycles
|
||||
journal journalDestinationConfig
|
||||
bucket string
|
||||
org string
|
||||
closeLock sync.Mutex
|
||||
closed bool
|
||||
|
||||
|
|
@ -64,6 +66,8 @@ func WithJournal(endpointURL, organisation, bucketName string) StoreOption {
|
|||
organisation: organisation,
|
||||
bucketName: bucketName,
|
||||
}
|
||||
storeInstance.bucket = bucketName
|
||||
storeInstance.org = organisation
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ func TestStore_New_Good_WithJournalOption(t *testing.T) {
|
|||
assert.Equal(t, "events", storeInstance.journal.bucketName)
|
||||
assert.Equal(t, "core", storeInstance.journal.organisation)
|
||||
assert.Equal(t, "http://127.0.0.1:8086", storeInstance.journal.endpointURL)
|
||||
assert.Equal(t, "events", storeInstance.bucket)
|
||||
assert.Equal(t, "core", storeInstance.org)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue