Documentation ¶
Index ¶
- Constants
- Variables
- func Unmarshal(values [][]byte, dests []proto.Message) (err error)
- type Batch
- type DB
- type PebbleBatch
- func (b *PebbleBatch) Close() error
- func (b *PebbleBatch) Commit() error
- func (b *PebbleBatch) Contents() ([][]byte, [][]byte)
- func (b *PebbleBatch) Delete(value data.StorableData)
- func (b *PebbleBatch) Empty() bool
- func (b *PebbleBatch) Len() int
- func (b *PebbleBatch) Put(item ...data.StorableData)
- func (b *PebbleBatch) PutWithTime(t *timestamppb.Timestamp, item ...data.StorableData)
- func (b *PebbleBatch) Reset()
- type PebbleDB
Constants ¶
View Source
const ( DefaultCacheSize = 1024 DefaultCacheTTL = 60 * 3 // 3min )
Variables ¶
View Source
var ( ErrNotFound = errors.New("data not found") ErrInvalidPagingKey = errors.New("invalid paging key") )
Functions ¶
Types ¶
type Batch ¶
type Batch interface { Put(item ...data.StorableData) PutWithTime(t *timestamppb.Timestamp, item ...data.StorableData) Delete(item data.StorableData) Commit() error Reset() Close() error Empty() bool Len() int Contents() ([][]byte, [][]byte) }
type PebbleBatch ¶
type PebbleBatch struct {
// contains filtered or unexported fields
}
func (*PebbleBatch) Close ¶
func (b *PebbleBatch) Close() error
func (*PebbleBatch) Commit ¶
func (b *PebbleBatch) Commit() error
func (*PebbleBatch) Contents ¶
func (b *PebbleBatch) Contents() ([][]byte, [][]byte)
func (*PebbleBatch) Delete ¶
func (b *PebbleBatch) Delete(value data.StorableData)
func (*PebbleBatch) Empty ¶
func (b *PebbleBatch) Empty() bool
func (*PebbleBatch) Len ¶
func (b *PebbleBatch) Len() int
func (*PebbleBatch) Put ¶
func (b *PebbleBatch) Put(item ...data.StorableData)
func (*PebbleBatch) PutWithTime ¶
func (b *PebbleBatch) PutWithTime(t *timestamppb.Timestamp, item ...data.StorableData)
func (*PebbleBatch) Reset ¶
func (b *PebbleBatch) Reset()
type PebbleDB ¶
type PebbleDB struct {
// contains filtered or unexported fields
}
func NewPebbleDB ¶
Click to show internal directories.
Click to hide internal directories.