Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxKeySize uint32 = 4 * 1024 MaxValueSize uint32 = 512 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
type Descriptor struct { // Current is the current descriptor Current *pb.DescriptorProto // contains filtered or unexported fields }
Descriptor describes all important DB state. Not thread-safe, access should be externally synchronized.
func LoadDescriptor ¶
func LoadDescriptor(dir string) (*Descriptor, error)
LoadDescriptor loads the highest numbered descriptor found in dir.
func NewDescriptor ¶
func NewDescriptor(dir string) *Descriptor
NewDescriptor returns a Descriptor for a brand new database. Most use cases should probably use LoadDescriptor instead.
func (*Descriptor) Save ¶
func (d *Descriptor) Save() error
Save persists Descriptor to stable storage.
type Iter ¶
type Iter interface { // Next advances the iterator. Returns true if there is a next value. Next() (bool, error) // Key returns the key of the current row. Key() string // Timestamp returns the timestamp of the current row. Timestamp() int64 // Value returns the value of the current row. Value() []byte // Close closes the iterator. Close() }
Iter is an iterator over rows.
func NewIterFromRows ¶
NewIterFromRows returns an Iter represents rows. rows must not be modified after.
type Options ¶
type Options struct { SstDir string MemtableFlushSize int64 LogDir string TargetLogSize int64 // BlockCacheSize is the size of the block cache. 0 disables the cache. BlockCacheSize int64 DescriptorDir string }
func DefaultOptions ¶
Click to show internal directories.
Click to hide internal directories.