mirror of https://github.com/tikv/client-go.git
*: add getPDClient to rawKV public api (#570)
Signed-off-by: dongxu <i@huangdx.net> Signed-off-by: dongxu <i@huangdx.net>
This commit is contained in:
parent
0d0ae0dcfb
commit
46dcf45f77
|
|
@ -361,6 +361,11 @@ func (c *Client) GetKeyTTL(ctx context.Context, key []byte, options ...RawOption
|
|||
return &ttl, nil
|
||||
}
|
||||
|
||||
// GetPDClient returns the PD client.
|
||||
func (c *Client) GetPDClient() pd.Client {
|
||||
return c.pdClient
|
||||
}
|
||||
|
||||
// Put stores a key-value pair to TiKV.
|
||||
func (c *Client) Put(ctx context.Context, key, value []byte, options ...RawOption) error {
|
||||
return c.PutWithTTL(ctx, key, value, 0, options...)
|
||||
|
|
|
|||
Loading…
Reference in New Issue