func (c *RawKVClient) Put(key, value []byte) error {
	req := &kvrpcpb.Request{
		Type: kvrpcpb.MessageType_CmdRawPut,
		CmdRawPutReq: &kvrpcpb.CmdRawPutRequest{
			Key:   key,
			Value: value,
		},
	}
	resp, err := c.sendKVReq(key, req)
	if err != nil {
		return errors.Trace(err)
	}
	cmdResp := resp.GetCmdRawPutResp()
	if cmdResp == nil {
		return errors.Trace(errBodyMissing)
	}
	if cmdResp.GetError() != "" {
		return errors.New(cmdResp.GetError())
	}
	return nil
}
// Put stores a key-value pair to TiKV.
Put stores a key-value pair to TiKV.
// Put stores a key - value pair to TiKV .
func (c *RawKVClient) Put(key, value []byte) error {
	req := &kvrpcpb.Request{
		Type: kvrpcpb.MessageType_CmdRawPut,
		CmdRawPutReq: &kvrpcpb.CmdRawPutRequest{
			Key:   key,
			Value: value,
		},
	}
	resp, err := c.sendKVReq(key, req)
	if err != nil {
		return errors.Trace(err)
	}
	cmdResp := resp.GetCmdRawPutResp()
	if cmdResp == nil {
		return errors.Trace(errBodyMissing)
	}
	if cmdResp.GetError() != "" {
		return errors.New(cmdResp.GetError())
	}
	return nil
}
func ( c * RawKVClient ) Put ( key , value [ ] byte ) error { req := & kvrpcpb . Request { Type : kvrpcpb . MessageType_CmdRawPut , CmdRawPutReq : & kvrpcpb . CmdRawPutRequest { Key : key , Value : value , } , } resp , err := c . sendKVReq ( key , req ) if err != nil { return errors . Trace ( err ) } cmdResp := resp . GetCmdRawPutResp ( ) if cmdResp == nil { return errors . Trace ( errBodyMissing ) } if cmdResp . GetError ( ) != " " { return errors . New ( cmdResp . GetError ( ) ) } return nil }
Put stores a key-value pair to TiKV.
Put stores a key - value pair to TiKV .