Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeWithoutPrefix(buf []byte, valueOffset uint64, v *Entry)
- func DirSize(path string) (int64, error)
- func Exists(path string) bool
- func FullVersion() string
- func GetDatafiles(path string) ([]string, error)
- func GetKeyValueSizes(buf []byte) (uint64, uint64)
- func ParseIds(fns []string) ([]int, error)
- func ReadBytes(r io.Reader) ([]byte, error)
- func ReadIndex(r io.Reader, t art.Tree) error
- func WriteBytes(b []byte, w io.Writer) (int, error)
- func WriteIndex(t art.Tree, w io.Writer) (err error)
- func WriteItem(item Item, w io.Writer) (int, error)
- type Datafile
- func (df *Datafile) Close() error
- func (df *Datafile) FileID() int
- func (df *Datafile) Name() string
- func (df *Datafile) Read() (e Entry, n int64, err error)
- func (df *Datafile) ReadAt(index, size int64) (e Entry, err error)
- func (df *Datafile) Size() int64
- func (df *Datafile) Sync() error
- func (df *Datafile) Write(e Entry) (int64, int64, error)
- type Decoder
- type Encoder
- type Entry
- type Item
Constants ¶
View Source
const ( KeySize = 4 ValueSize = 8 )
View Source
const ( Int32Size = 4 Int64Size = 8 FileIDSize = Int32Size OffsetSize = Int64Size SizeSize = Int64Size )
View Source
const (
DefaultDatafileFilename = "%09d.data"
)
Variables ¶
View Source
var ( ErrReadonly = errors.New("error: read only datafile") ErrReadError = errors.New("error: read error") )
View Source
var ( // Version release version Version = "0.0.1" // Commit will be overwritten automatically by the build system Commit = "HEAD" )
Functions ¶
func DecodeWithoutPrefix ¶ added in v0.3.3
func GetDatafiles ¶
func GetKeyValueSizes ¶ added in v0.3.3
Types ¶
type Decoder ¶ added in v0.3.3
type Decoder struct {
// contains filtered or unexported fields
}
Decoder wraps an underlying io.Reader and allows you to stream Entry decodings on it.
func NewDecoder ¶ added in v0.3.3
NewDecoder creates a streaming Entry decoder.
type Encoder ¶ added in v0.3.3
type Encoder struct {
// contains filtered or unexported fields
}
Encoder wraps an underlying io.Writer and allows you to stream Entry encodings on it.
func NewEncoder ¶ added in v0.3.3
NewEncoder creates a streaming Entry encoder.
Click to show internal directories.
Click to hide internal directories.