client

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZlibFileSuffix   = ".zz"
	SnappyFileSuffix = ".snappy"
)
View Source
const (
	SSTFileExtension       = ".sst"
	DefaultSSTFileSize     = 128 * 1024 * 1024
	DefaultSorterChunkSize = 256 * 1024 * 1024

	// SizeKeyLength is the number of bytes used to encode key length in sort payload
	SizeKeyLength = 4
)
View Source
const DefaultChunkSize = 1000000

Variables

This section is empty.

Functions

func ChangeSetGroupCmd

func ChangeSetGroupCmd() *cobra.Command

func ChangeSetToVersionDBCmd

func ChangeSetToVersionDBCmd() *cobra.Command

func ConvertToSSTTSCmd

func ConvertToSSTTSCmd() *cobra.Command

func DumpChangeSetCmd

func DumpChangeSetCmd() *cobra.Command

func IngestSSTCmd

func IngestSSTCmd() *cobra.Command

func IterateChangeSets

func IterateChangeSets(
	reader Reader,
	fn func(version int64, changeSet *iavl.ChangeSet) (bool, error),
) (int64, error)

IterateChangeSets iterate the change set files,

func IterateVersions

func IterateVersions(
	reader Reader,
	fn func(version int64) (bool, error),
) (int64, error)

IterateVersions iterate the version numbers in change set files, skipping the change set payloads.

func PrintChangeSetCmd

func PrintChangeSetCmd() *cobra.Command

func ReadChangeSet

func ReadChangeSet(reader Reader, parseChangeset bool) (int64, int64, *iavl.ChangeSet, error)

ReadChangeSet decode a version of change set from reader. if parseChangeset is false, it'll skip change set payload directly.

returns (version, number of bytes read, changeSet, err)

func VerifyChangeSetCmd

func VerifyChangeSetCmd() *cobra.Command

func WriteChangeSet

func WriteChangeSet(writer io.Writer, version int64, cs iavl.ChangeSet) error

WriteChangeSet writes a version of change sets to writer.

Change set file format: ``` version: int64 size: int64 // size of whole payload payload:

delete: int8
keyLen: varint-uint64
key
[ // if delete is false
  valueLen: varint-uint64
  value
]
repeat with next key-value pair

repeat with next version ```

Types

type Range

type Range struct {
	Start, End int64
}

type ReadCloser

type ReadCloser interface {
	Reader
	io.Closer
}

ReadCloser combines `Reader` and `io.Closer`.

func WrapReader

func WrapReader(reader Reader, closer io.Closer) ReadCloser

WrapReader wraps reader and closer together to create an new io.ReadCloser.

The Read function will simply call the wrapped reader's Read function, while the Close function will call the wrapped closer's Close function.

If the wrapped reader is also an io.Closer, its Close function will be called in Close as well.

closer can be `nil`, to support stdin.

type Reader

type Reader interface {
	io.Reader
	io.ByteReader
}

Reader combines `io.Reader` and `io.ByteReader`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL