|
|
@ -17,6 +17,7 @@ It has these top-level messages: |
|
|
|
HDelRequest |
|
|
|
SetExpireRequest |
|
|
|
GetStringResponse |
|
|
|
HGetListResponse |
|
|
|
SetResponse |
|
|
|
DelResponse |
|
|
|
HSetResponse |
|
|
@ -229,6 +230,23 @@ func (m *GetStringResponse) GetValue() string { |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
// 使用key查询响应结构
|
|
|
|
type HGetListResponse struct { |
|
|
|
List []byte `protobuf:"bytes,1,opt,name=list" json:"list,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *HGetListResponse) Reset() { *m = HGetListResponse{} } |
|
|
|
func (m *HGetListResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*HGetListResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
func (m *HGetListResponse) GetList() []byte { |
|
|
|
if m != nil { |
|
|
|
return m.List |
|
|
|
} |
|
|
|
return nil |
|
|
|
} |
|
|
|
|
|
|
|
// 设置key响应结构
|
|
|
|
type SetResponse struct { |
|
|
|
Ret *string `protobuf:"bytes,1,opt,name=ret" json:"ret,omitempty"` |
|
|
@ -308,6 +326,7 @@ type RedisService interface { |
|
|
|
HSet(in *HSetRequest, out *HSetResponse) error |
|
|
|
HDel(in *HDelRequest, out *DelResponse) error |
|
|
|
SetExpire(in *SetExpireRequest, out *SetExpireResponse) error |
|
|
|
HGetAll(in *GetRequest, out *HGetListResponse) error |
|
|
|
} |
|
|
|
|
|
|
|
// AcceptRedisServiceClient accepts connections on the listener and serves requests
|
|
|
@ -400,6 +419,9 @@ func (c *RedisServiceClient) HDel(in *HDelRequest, out *DelResponse) error { |
|
|
|
func (c *RedisServiceClient) SetExpire(in *SetExpireRequest, out *SetExpireResponse) error { |
|
|
|
return c.Call("RedisService.SetExpire", in, out) |
|
|
|
} |
|
|
|
func (c *RedisServiceClient) HGetAll(in *GetRequest, out *HGetListResponse) error { |
|
|
|
return c.Call("RedisService.HGetAll", in, out) |
|
|
|
} |
|
|
|
|
|
|
|
// DialRedisService connects to an RedisService at the specified network address.
|
|
|
|
func DialRedisService(network, addr string) (*RedisServiceClient, *rpc.Client, error) { |
|
|
|