Documentation ¶
Index ¶
- func NewGoLevelDB(path string) (*goLevelDB, error)
- func NewMemory() *memory
- func PutFloat32(dst []byte, v float32) []byte
- func PutFloat64(dst []byte, v float64) []byte
- func PutUInt32(dst []byte, v uint32) []byte
- func PutUInt64(dst []byte, v uint64) []byte
- func ReadFloat32(src []byte) float32
- func ReadFloat64(src []byte) float64
- func ReadUInt32(src []byte) uint32
- func ReadUInt64(src []byte) uint64
- type Batch
- type Combined
- func (c *Combined) Clear(mode DBMode)
- func (c *Combined) Close()
- func (c *Combined) Delete(mode DBMode, key []byte) error
- func (c *Combined) Get(mode DBMode, key []byte) ([]byte, error)
- func (c *Combined) GetFromAll(key []byte) ([]byte, error)
- func (c *Combined) PrefixStream(mode DBMode, prefix []byte, onData func(Iterator))
- func (c *Combined) PrefixStreamFromAll(prefix []byte, onData func(Iterator))
- func (c *Combined) Put(mode DBMode, key []byte, value []byte) error
- func (c *Combined) WriteBatch(mode DBMode, f func(Batch) error) error
- type DB
- type DBMode
- type Decoder
- func (d *Decoder) ReadBool() bool
- func (d *Decoder) ReadBytes() []byte
- func (d *Decoder) ReadFloat32() float32
- func (d *Decoder) ReadFloat64() float64
- func (d *Decoder) ReadInt() int
- func (d *Decoder) ReadLocation() protocol.Location
- func (d *Decoder) ReadPosition() protocol.Position
- func (d *Decoder) ReadString() string
- func (d *Decoder) ReadUInt32() uint32
- func (d *Decoder) ReadUInt64() uint64
- type Encoder
- func (e *Encoder) Bytes() []byte
- func (e *Encoder) WriteBool(b bool)
- func (e *Encoder) WriteBytes(b []byte)
- func (e *Encoder) WriteFloat32(v float32)
- func (e *Encoder) WriteFloat64(v float64)
- func (e *Encoder) WriteInt(v int)
- func (e *Encoder) WriteLocation(v protocol.Location)
- func (e *Encoder) WritePosition(v protocol.Position)
- func (e *Encoder) WriteString(v string)
- func (e *Encoder) WriteUInt32(v uint32)
- func (e *Encoder) WriteUInt64(v uint64)
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoLevelDB ¶
func PutFloat32 ¶
PutFloat32 appens a float32 to the byte slice
func PutFloat64 ¶
PutFloat64 appends a float64 to the byte slice
func ReadFloat32 ¶
ReadFloat32 reads a float32 from the byte slice
func ReadFloat64 ¶
ReadFloat64 reads a float64 from the byte slice
Types ¶
type Combined ¶
type Combined struct {
// contains filtered or unexported fields
}
Combined is a combination of storage modes
func NewCombined ¶
NewCombined returns a combined instance of disk and memory
func NewMemOnly ¶
func NewMemOnly() *Combined
func (*Combined) PrefixStream ¶
func (*Combined) PrefixStreamFromAll ¶
type Decoder ¶
type Decoder coder
Decoder is a coder to decode byte slice into primitives
func (*Decoder) ReadLocation ¶
ReadLocation reads a LSP location
func (*Decoder) ReadPosition ¶
ReadPosition reads a LSP position
type Encoder ¶
type Encoder coder
Encoder is an encoder to encode primitives to byte slice
func (*Encoder) WriteFloat32 ¶
WriteFloat32 writes a float32
func (*Encoder) WriteFloat64 ¶
WriteFloat64 writes a float64
func (*Encoder) WriteLocation ¶
WriteLocation writes a LSP location
func (*Encoder) WritePosition ¶
WritePosition writes a LSP position
Click to show internal directories.
Click to hide internal directories.