*: 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:
dongxu 2022-08-24 23:09:33 -04:00 committed by GitHub
parent 0d0ae0dcfb
commit 46dcf45f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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...)