Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDebugBackend ¶
NewDebugBackend wraps both stores from a Backend with a debugger.
func NewDebugStore ¶
NewDebugStore wraps the store with the debugger instance returning a debug store wrapper.
func NewSharedMemBackend ¶
NewSharedMemBackend returns a Backend instance which uses a single backing memory store to simulate legacy scenarios where only a single KV-store is available to modules.
func NewSplitMemBackend ¶
NewSplitMemBackend returns a Backend instance which uses two separate memory stores to simulate behavior when there are really two separate backing stores.
Types ¶
type Debugger ¶
type Debugger interface { // Log logs a single log message. Log(string) // Decode decodes a key-value entry into a debug string. Decode(key, value []byte) string }
Debugger is an interface that handles debug info from the debug store wrapper.
type EntryCodecDebugger ¶
type EntryCodecDebugger struct { EntryCodec ormkv.EntryCodec Print func(string) }
EntryCodecDebugger is a Debugger instance that uses an EntryCodec and Print function for debugging.
func (*EntryCodecDebugger) Decode ¶
func (d *EntryCodecDebugger) Decode(key, value []byte) string
func (*EntryCodecDebugger) Log ¶
func (d *EntryCodecDebugger) Log(s string)