executor

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Del

func Del(rootCtx *Context, hashKeyStr, sortkeyStr string) error

func Get

func Get(rootCtx *Context, hashKeyStr, sortkeyStr string) error

func PartitionIndex

func PartitionIndex(rootCtx *Context, hashKeyStr string) error

func Set

func Set(rootCtx *Context, hashKeyStr, sortkeyStr, valueStr string) error

Types

type Context

type Context struct {
	// Every command should use Context as the fmt.Fprint's writer.
	io.Writer

	pegasus.Client

	Meta *session.MetaManager

	// default to nil
	UseTable     pegasus.TableConnector
	UseTableName string
	// default to 0
	UseTablePartitionCount int

	// default to nil
	Compressor util.BytesCompression

	HashKeyEnc, SortKeyEnc, ValueEnc util.Encoder
}

func NewContext

func NewContext(writer io.Writer, metaAddrs []string) *Context

func (*Context) String

func (c *Context) String() string

String returns a human-readable string of context.

type ScanCommand

type ScanCommand struct {
	HashKey string

	// optional
	From, To                 *string
	Prefix, Suffix, Contains *string

	// only calculate the count of sortkeys under this hashkey.
	// default to false.
	CountOnly bool
}

ScanCommand wraps scan command input.

func (*ScanCommand) IterateAll

func (s *ScanCommand) IterateAll(rootCtx *Context) error

IterateAll iterates over the table according to the command.

func (*ScanCommand) Validate

func (s *ScanCommand) Validate() error

Validate if ScanCommand is valid.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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