Documentation
¶
Index ¶
- type Client
- func (c *Client) AddHook(hookFn HookFunc)
- func (c *Client) Append(ctx context.Context, table string, key string, ...) (*hrpc.Result, error)
- func (c *Client) Close() error
- func (c *Client) Delete(ctx context.Context, table string, key string, ...) (*hrpc.Result, error)
- func (c *Client) Get(ctx context.Context, table, key []byte, options ...func(hrpc.Call) error) (result *hrpc.Result, err error)
- func (c *Client) GetStr(ctx context.Context, table, key string, options ...func(hrpc.Call) error) (result *hrpc.Result, err error)
- func (c *Client) Increment(ctx context.Context, table string, key string, ...) (int64, error)
- func (c *Client) IncrementSingle(ctx context.Context, table string, key string, family string, qualifier string, ...) (int64, error)
- func (c *Client) Ping(ctx context.Context) (err error)
- func (c *Client) PutStr(ctx context.Context, table string, key string, ...) (*hrpc.Result, error)
- func (c *Client) Scan(ctx context.Context, table []byte, options ...func(hrpc.Call) error) (scanner hrpc.Scanner, err error)
- func (c *Client) ScanAll(ctx context.Context, table []byte, options ...func(hrpc.Call) error) (results []*hrpc.Result, err error)
- func (c *Client) ScanRange(ctx context.Context, table, startRow, stopRow []byte, ...) (scanner hrpc.Scanner, err error)
- func (c *Client) ScanRangeStr(ctx context.Context, table, startRow, stopRow string, ...) (hrpc.Scanner, error)
- type Config
- type HookFunc
- type ZKConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Append ¶
func (c *Client) Append(ctx context.Context, table string, key string, values map[string]map[string][]byte, options ...func(hrpc.Call) error) (*hrpc.Result, error)
Append do a append command.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, table, key []byte, options ...func(hrpc.Call) error) (result *hrpc.Result, err error)
Get get result for the given table and row key. NOTE: if err != nil then result != nil, if result not exists result.Cells length is 0
func (*Client) GetStr ¶
func (c *Client) GetStr(ctx context.Context, table, key string, options ...func(hrpc.Call) error) (result *hrpc.Result, err error)
GetStr do a get command. NOTE: if err != nil then result != nil, if result not exists result.Cells length is 0
func (*Client) Increment ¶
func (c *Client) Increment(ctx context.Context, table string, key string, values map[string]map[string][]byte, options ...func(hrpc.Call) error) (int64, error)
Increment the given values in HBase under the given table and key.
func (*Client) IncrementSingle ¶
func (c *Client) IncrementSingle(ctx context.Context, table string, key string, family string, qualifier string, amount int64, options ...func(hrpc.Call) error) (int64, error)
IncrementSingle increment the given value by amount in HBase under the given table, key, family and qualifier.
func (*Client) PutStr ¶
func (c *Client) PutStr(ctx context.Context, table string, key string, values map[string]map[string][]byte, options ...func(hrpc.Call) error) (*hrpc.Result, error)
PutStr insert the given family-column-values in the given row key of the given table.
func (*Client) Scan ¶
func (c *Client) Scan(ctx context.Context, table []byte, options ...func(hrpc.Call) error) (scanner hrpc.Scanner, err error)
Scan do a scan command.
func (*Client) ScanRange ¶
func (c *Client) ScanRange(ctx context.Context, table, startRow, stopRow []byte, options ...func(hrpc.Call) error) (scanner hrpc.Scanner, err error)
ScanRange get a scanner for the given table and key range. The range is half-open, i.e. [startRow; stopRow[ -- stopRow is not included in the range.
func (*Client) ScanRangeStr ¶
func (c *Client) ScanRangeStr(ctx context.Context, table, startRow, stopRow string, options ...func(hrpc.Call) error) (hrpc.Scanner, error)
ScanRangeStr get a scanner for the given table and key range. The range is half-open, i.e. [startRow; stopRow[ -- stopRow is not included in the range.