[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #70
1 changed files with 0 additions and 5 deletions
5
store.go
5
store.go
|
|
@ -134,8 +134,6 @@ func WithPurgeInterval(interval time.Duration) StoreOption {
|
|||
}
|
||||
|
||||
// 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: 20 * time.Millisecond})`
|
||||
// NewConfigured also scans `.core/state` for leftover `.duckdb` workspace files
|
||||
// so orphan recovery can happen before the first explicit recovery call.
|
||||
func NewConfigured(config StoreConfig) (*Store, error) {
|
||||
return newStoreFromConfig("store.NewConfigured", config)
|
||||
}
|
||||
|
|
@ -157,14 +155,11 @@ func newStoreFromConfig(operation string, config StoreConfig) (*Store, error) {
|
|||
storeInstance.purgeInterval = config.PurgeInterval
|
||||
}
|
||||
|
||||
_ = discoverOrphanWorkspacePaths(defaultWorkspaceStateDirectory)
|
||||
storeInstance.startBackgroundPurge()
|
||||
return storeInstance, nil
|
||||
}
|
||||
|
||||
// Usage example: `storeInstance, err := store.New("/tmp/go-store.db", store.WithJournal("http://127.0.0.1:8086", "core", "events"))`
|
||||
// New scans `.core/state` for leftover `.duckdb` workspace files before the
|
||||
// store starts its background purge loop.
|
||||
func New(databasePath string, options ...StoreOption) (*Store, error) {
|
||||
config := StoreConfig{DatabasePath: databasePath}
|
||||
for _, option := range options {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue