[agent/codex:gpt-5.4-mini] Read docs/RFC-STORE.md fully. Find features described in the... #147

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-store-rfc-md-fu into dev 2026-04-04 13:25:33 +00:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 019a72d152 - Show all commits

View file

@ -15,6 +15,8 @@ var defaultArchiveOutputDirectory = ".core/archive/"
// compressed JSONL file.
//
// Usage example: `options := store.CompactOptions{Before: time.Now().Add(-90 * 24 * time.Hour), Output: "/tmp/archive", Format: "gzip"}`
// The default output directory is `.core/archive/`; the default format is
// `gzip`, and `zstd` is also supported.
type CompactOptions struct {
// Usage example: `options := store.CompactOptions{Before: time.Now().Add(-90 * 24 * time.Hour)}`
Before time.Time

View file

@ -27,10 +27,11 @@ const (
entryValueColumn = "entry_value"
)
// Usage example: `configuredStore, err := store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}})`
// Usage example: `storeInstance, err := store.New("/tmp/go-store.db", store.WithJournal("http://127.0.0.1:8086", "core", "events"), store.WithPurgeInterval(30*time.Second))`
// Prefer `store.NewConfigured(store.StoreConfig{...})` when the configuration
// is already known as a struct literal. Use `StoreOption` only when the values
// need to be assembled incrementally.
// 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
// different sources.
type StoreOption func(*StoreConfig)
// Usage example: `config := store.StoreConfig{DatabasePath: ":memory:", PurgeInterval: 30 * time.Second}`