|
@ -28,6 +28,7 @@ It has these top-level messages: |
|
|
LSetRequest |
|
|
LSetRequest |
|
|
LSetResponse |
|
|
LSetResponse |
|
|
LRangeRequest |
|
|
LRangeRequest |
|
|
|
|
|
LLenRequest |
|
|
*/ |
|
|
*/ |
|
|
package redisrpc |
|
|
package redisrpc |
|
|
|
|
|
|
|
@ -455,6 +456,23 @@ func (m *LRangeRequest) GetStop() int64 { |
|
|
return 0 |
|
|
return 0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 列表长度
|
|
|
|
|
|
type LLenRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LLenRequest) Reset() { *m = LLenRequest{} } |
|
|
|
|
|
func (m *LLenRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*LLenRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LLenRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func init() { |
|
|
func init() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -476,6 +494,7 @@ type RedisService interface { |
|
|
LLpush(in *LSetRequest, out *LSetResponse) error |
|
|
LLpush(in *LSetRequest, out *LSetResponse) error |
|
|
LRpush(in *LSetRequest, out *LSetResponse) error |
|
|
LRpush(in *LSetRequest, out *LSetResponse) error |
|
|
LRange(in *LRangeRequest, out *HGetListResponse) error |
|
|
LRange(in *LRangeRequest, out *HGetListResponse) error |
|
|
|
|
|
LLen(in *LLenRequest, out *LSetResponse) error |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// AcceptRedisServiceClient accepts connections on the listener and serves requests
|
|
|
// AcceptRedisServiceClient accepts connections on the listener and serves requests
|
|
@ -598,6 +617,9 @@ func (c *RedisServiceClient) LRpush(in *LSetRequest, out *LSetResponse) error { |
|
|
func (c *RedisServiceClient) LRange(in *LRangeRequest, out *HGetListResponse) error { |
|
|
func (c *RedisServiceClient) LRange(in *LRangeRequest, out *HGetListResponse) error { |
|
|
return c.Call("RedisService.LRange", in, out) |
|
|
return c.Call("RedisService.LRange", in, out) |
|
|
} |
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) LLen(in *LLenRequest, out *LSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.LLen", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// DialRedisService connects to an RedisService at the specified network address.
|
|
|
// DialRedisService connects to an RedisService at the specified network address.
|
|
|
func DialRedisService(network, addr string) (*RedisServiceClient, *rpc.Client, error) { |
|
|
func DialRedisService(network, addr string) (*RedisServiceClient, *rpc.Client, error) { |
|
|