Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RawKVBatchClient ¶
type RawKVBatchClient struct {
// contains filtered or unexported fields
}
RawKVBatchClient is used to put raw kv-entry into tikv. Note: it is not thread safe.
func NewRawKVBatchClient ¶
func NewRawKVBatchClient( rawkvClient RawkvClient, batchCount int, ) *RawKVBatchClient
NewRawKVBatchClient create a batch rawkv client.
func (*RawKVBatchClient) Close ¶
func (c *RawKVBatchClient) Close()
Close closes the RawKVBatchClient.
func (*RawKVBatchClient) Put ¶
Put puts (key, value) into buffer justly, wait for batch write if the buffer is full.
func (*RawKVBatchClient) PutRest ¶
func (c *RawKVBatchClient) PutRest(ctx context.Context) error
PutRest writes the rest pairs (key, values) into tikv.
func (*RawKVBatchClient) SetColumnFamily ¶
func (c *RawKVBatchClient) SetColumnFamily(columnFamily string)
SetColumnFamily set the columnFamily for the client.
type RawkvClient ¶
type RawkvClient interface { Get(ctx context.Context, key []byte, options ...rawkv.RawOption) ([]byte, error) Put(ctx context.Context, key, value []byte, options ...rawkv.RawOption) error BatchGet(ctx context.Context, keys [][]byte, options ...rawkv.RawOption) ([][]byte, error) BatchPut(ctx context.Context, keys, values [][]byte, options ...rawkv.RawOption) error Close() error }
RawkvClient is the interface for rawkv.client
func NewRawkvClient ¶
func NewRawkvClient(ctx context.Context, pdAddrs []string, security config.Security) (RawkvClient, error)
NewRawkvClient create a rawkv client.
Click to show internal directories.
Click to hide internal directories.