Documentation
¶
Overview ¶
Package memory provides an in-memory persistence Driver.
Data is organized into named silos. A silo is an isolated group of in-memory stores that persists for the lifetime of the process. Multiple drivers that reference the same silo name share the same underlying data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.18.0
type Config struct {
// Silo is the name of the shared in-memory silo. Drivers with the same
// silo name share state for the lifetime of the process.
Silo string
}
Config holds the configuration for an in-memory persistence driver.
func FromURL ¶ added in v0.18.0
FromURL returns a *Config for the given memory:// *url.URL. See ParseURL for the URL format.
type Driver ¶ added in v0.18.0
type Driver struct {
// contains filtered or unexported fields
}
Driver is a persistence driver backed by a named in-memory silo.
func (*Driver) Close ¶ added in v0.18.0
Close is a no-op. The silo's state persists for the lifetime of the process.
func (*Driver) JournalStore ¶ added in v0.18.0
func (d *Driver) JournalStore() journal.BinaryStore
JournalStore returns the silo's in-memory journal store.
func (*Driver) KVStore ¶ added in v0.18.0
func (d *Driver) KVStore() kv.BinaryStore
KVStore returns the silo's in-memory key/value store.
func (*Driver) SetStore ¶ added in v0.18.0
func (d *Driver) SetStore() set.BinaryStore
SetStore returns the silo's in-memory set store.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
clone
Package clone provides a protocol-buffers-aware deep clone function.
|
Package clone provides a protocol-buffers-aware deep clone function. |
|
Package memoryjournal provides an in-memory implementation of journal.Store.
|
Package memoryjournal provides an in-memory implementation of journal.Store. |
|
Package memorykv provides an in-memory implementation of kv.Store.
|
Package memorykv provides an in-memory implementation of kv.Store. |
|
Package memoryset provides an in-memory implementation of set.BinaryStore.
|
Package memoryset provides an in-memory implementation of set.BinaryStore. |