Documentation ¶
Index ¶
- func AssertBackendsEqual(t assert.TestingT, b1, b2 ormtable.Backend)
- func AssertIteratorsEqual(t assert.TestingT, it1, it2 kv.Iterator)
- func NewDebugBackend(backend ormtable.Backend, debugger Debugger) ormtable.Backend
- func NewDebugStore(store kv.Store, debugger Debugger, storeName string) kv.Store
- func NewGoLevelDBBackend(t testing.TB) ormtable.Backend
- func NewSharedMemBackend() ormtable.Backend
- func NewSplitMemBackend() ormtable.Backend
- type Debugger
- type EntryCodecDebugger
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.
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)
Click to show internal directories.
Click to hide internal directories.