wheat-cache/pkg/proto/storage.pb.go

542 lines
20 KiB
Go
Raw Normal View History

// Code generated by gen-struct. DO NOT EDIT.
// make gen-protobuf generated
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// source: storage.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_storage_proto protoreflect.FileDescriptor
var file_storage_proto_rawDesc = []byte{
0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
2021-10-20 20:30:51 +08:00
0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa2,
0x03, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a,
2021-09-25 23:38:19 +08:00
0x03, 0x53, 0x65, 0x74, 0x12, 0x0b, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0c, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x20, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0b, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x20, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x12, 0x0e, 0x2e,
0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e,
0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29,
0x0a, 0x06, 0x53, 0x65, 0x74, 0x62, 0x69, 0x74, 0x12, 0x0e, 0x2e, 0x53, 0x65, 0x74, 0x62, 0x69,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x65, 0x74, 0x62, 0x69,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x47, 0x65, 0x74,
0x62, 0x69, 0x74, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x62, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x62, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70,
2021-10-20 20:30:51 +08:00
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65,
0x12, 0x10, 0x2e, 0x47, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x73, 0x65, 0x74, 0x12,
0x0e, 0x2e, 0x47, 0x65, 0x74, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0f, 0x2e, 0x47, 0x65, 0x74, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x29, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x6c, 0x65, 0x6e, 0x12, 0x0e, 0x2e, 0x53, 0x74, 0x72,
0x6c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x74, 0x72,
0x6c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x53,
0x65, 0x74, 0x6e, 0x78, 0x12, 0x0d, 0x2e, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_storage_proto_goTypes = []interface{}{
2021-10-20 20:30:51 +08:00
(*SetRequest)(nil), // 0: SetRequest
(*GetRequest)(nil), // 1: GetRequest
(*AddRequest)(nil), // 2: AddRequest
(*ReduceRequest)(nil), // 3: ReduceRequest
(*SetbitRequest)(nil), // 4: SetbitRequest
(*GetbitRequest)(nil), // 5: GetbitRequest
(*GetrangeRequest)(nil), // 6: GetrangeRequest
(*GetsetRequest)(nil), // 7: GetsetRequest
(*StrlenRequest)(nil), // 8: StrlenRequest
(*SetnxRequest)(nil), // 9: SetnxRequest
(*SetResponse)(nil), // 10: SetResponse
(*GetResponse)(nil), // 11: GetResponse
(*AddResponse)(nil), // 12: AddResponse
(*ReduceResponse)(nil), // 13: ReduceResponse
(*SetbitResponse)(nil), // 14: SetbitResponse
(*GetbitResponse)(nil), // 15: GetbitResponse
(*GetrangeResponse)(nil), // 16: GetrangeResponse
(*GetsetResponse)(nil), // 17: GetsetResponse
(*StrlenResponse)(nil), // 18: StrlenResponse
(*SetnxResponse)(nil), // 19: SetnxResponse
}
var file_storage_proto_depIdxs = []int32{
2021-09-25 23:38:19 +08:00
0, // 0: CommServer.Set:input_type -> SetRequest
1, // 1: CommServer.Get:input_type -> GetRequest
2, // 2: CommServer.Add:input_type -> AddRequest
3, // 3: CommServer.Reduce:input_type -> ReduceRequest
4, // 4: CommServer.Setbit:input_type -> SetbitRequest
5, // 5: CommServer.Getbit:input_type -> GetbitRequest
2021-10-20 20:30:51 +08:00
6, // 6: CommServer.Getrange:input_type -> GetrangeRequest
7, // 7: CommServer.Getset:input_type -> GetsetRequest
8, // 8: CommServer.Strlen:input_type -> StrlenRequest
9, // 9: CommServer.Setnx:input_type -> SetnxRequest
10, // 10: CommServer.Set:output_type -> SetResponse
11, // 11: CommServer.Get:output_type -> GetResponse
12, // 12: CommServer.Add:output_type -> AddResponse
13, // 13: CommServer.Reduce:output_type -> ReduceResponse
14, // 14: CommServer.Setbit:output_type -> SetbitResponse
15, // 15: CommServer.Getbit:output_type -> GetbitResponse
16, // 16: CommServer.Getrange:output_type -> GetrangeResponse
17, // 17: CommServer.Getset:output_type -> GetsetResponse
18, // 18: CommServer.Strlen:output_type -> StrlenResponse
19, // 19: CommServer.Setnx:output_type -> SetnxResponse
10, // [10:20] is the sub-list for method output_type
0, // [0:10] is the sub-list for method input_type
2021-09-25 23:38:19 +08:00
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_storage_proto_init() }
func file_storage_proto_init() {
if File_storage_proto != nil {
return
}
file_stringx_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_storage_proto_rawDesc,
NumEnums: 0,
2021-09-25 23:38:19 +08:00
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_storage_proto_goTypes,
DependencyIndexes: file_storage_proto_depIdxs,
}.Build()
File_storage_proto = out.File
file_storage_proto_rawDesc = nil
file_storage_proto_goTypes = nil
file_storage_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// CommServerClient is the client API for CommServer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CommServerClient interface {
2021-09-25 23:38:19 +08:00
Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
Reduce(ctx context.Context, in *ReduceRequest, opts ...grpc.CallOption) (*ReduceResponse, error)
Setbit(ctx context.Context, in *SetbitRequest, opts ...grpc.CallOption) (*SetbitResponse, error)
Getbit(ctx context.Context, in *GetbitRequest, opts ...grpc.CallOption) (*GetbitResponse, error)
2021-10-20 20:30:51 +08:00
Getrange(ctx context.Context, in *GetrangeRequest, opts ...grpc.CallOption) (*GetrangeResponse, error)
Getset(ctx context.Context, in *GetsetRequest, opts ...grpc.CallOption) (*GetsetResponse, error)
Strlen(ctx context.Context, in *StrlenRequest, opts ...grpc.CallOption) (*StrlenResponse, error)
Setnx(ctx context.Context, in *SetnxRequest, opts ...grpc.CallOption) (*SetnxResponse, error)
}
type commServerClient struct {
cc grpc.ClientConnInterface
}
func NewCommServerClient(cc grpc.ClientConnInterface) CommServerClient {
return &commServerClient{cc}
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) {
out := new(SetResponse)
err := c.cc.Invoke(ctx, "/CommServer/Set", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
err := c.cc.Invoke(ctx, "/CommServer/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) {
out := new(AddResponse)
err := c.cc.Invoke(ctx, "/CommServer/Add", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Reduce(ctx context.Context, in *ReduceRequest, opts ...grpc.CallOption) (*ReduceResponse, error) {
out := new(ReduceResponse)
err := c.cc.Invoke(ctx, "/CommServer/Reduce", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Setbit(ctx context.Context, in *SetbitRequest, opts ...grpc.CallOption) (*SetbitResponse, error) {
out := new(SetbitResponse)
err := c.cc.Invoke(ctx, "/CommServer/Setbit", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-09-25 23:38:19 +08:00
func (c *commServerClient) Getbit(ctx context.Context, in *GetbitRequest, opts ...grpc.CallOption) (*GetbitResponse, error) {
out := new(GetbitResponse)
err := c.cc.Invoke(ctx, "/CommServer/Getbit", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2021-10-20 20:30:51 +08:00
func (c *commServerClient) Getrange(ctx context.Context, in *GetrangeRequest, opts ...grpc.CallOption) (*GetrangeResponse, error) {
out := new(GetrangeResponse)
err := c.cc.Invoke(ctx, "/CommServer/Getrange", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) Getset(ctx context.Context, in *GetsetRequest, opts ...grpc.CallOption) (*GetsetResponse, error) {
out := new(GetsetResponse)
err := c.cc.Invoke(ctx, "/CommServer/Getset", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) Strlen(ctx context.Context, in *StrlenRequest, opts ...grpc.CallOption) (*StrlenResponse, error) {
out := new(StrlenResponse)
err := c.cc.Invoke(ctx, "/CommServer/Strlen", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) Setnx(ctx context.Context, in *SetnxRequest, opts ...grpc.CallOption) (*SetnxResponse, error) {
out := new(SetnxResponse)
err := c.cc.Invoke(ctx, "/CommServer/Setnx", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CommServerServer is the server API for CommServer service.
type CommServerServer interface {
2021-09-25 23:38:19 +08:00
Set(context.Context, *SetRequest) (*SetResponse, error)
Get(context.Context, *GetRequest) (*GetResponse, error)
Add(context.Context, *AddRequest) (*AddResponse, error)
Reduce(context.Context, *ReduceRequest) (*ReduceResponse, error)
Setbit(context.Context, *SetbitRequest) (*SetbitResponse, error)
Getbit(context.Context, *GetbitRequest) (*GetbitResponse, error)
2021-10-20 20:30:51 +08:00
Getrange(context.Context, *GetrangeRequest) (*GetrangeResponse, error)
Getset(context.Context, *GetsetRequest) (*GetsetResponse, error)
Strlen(context.Context, *StrlenRequest) (*StrlenResponse, error)
Setnx(context.Context, *SetnxRequest) (*SetnxResponse, error)
}
// UnimplementedCommServerServer can be embedded to have forward compatible implementations.
type UnimplementedCommServerServer struct {
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Set(context.Context, *SetRequest) (*SetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Add(context.Context, *AddRequest) (*AddResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Add not implemented")
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Reduce(context.Context, *ReduceRequest) (*ReduceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Reduce not implemented")
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Setbit(context.Context, *SetbitRequest) (*SetbitResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Setbit not implemented")
}
2021-09-25 23:38:19 +08:00
func (*UnimplementedCommServerServer) Getbit(context.Context, *GetbitRequest) (*GetbitResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Getbit not implemented")
}
2021-10-20 20:30:51 +08:00
func (*UnimplementedCommServerServer) Getrange(context.Context, *GetrangeRequest) (*GetrangeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Getrange not implemented")
}
func (*UnimplementedCommServerServer) Getset(context.Context, *GetsetRequest) (*GetsetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Getset not implemented")
}
func (*UnimplementedCommServerServer) Strlen(context.Context, *StrlenRequest) (*StrlenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Strlen not implemented")
}
func (*UnimplementedCommServerServer) Setnx(context.Context, *SetnxRequest) (*SetnxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Setnx not implemented")
}
func RegisterCommServerServer(s *grpc.Server, srv CommServerServer) {
s.RegisterService(&_CommServer_serviceDesc, srv)
}
func _CommServer_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Set(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Set",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Set(ctx, req.(*SetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Add(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Add",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Add(ctx, req.(*AddRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Reduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReduceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Reduce(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Reduce",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Reduce(ctx, req.(*ReduceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Setbit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetbitRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Setbit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Setbit",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Setbit(ctx, req.(*SetbitRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Getbit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetbitRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Getbit(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Getbit",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Getbit(ctx, req.(*GetbitRequest))
}
return interceptor(ctx, in, info, handler)
}
2021-10-20 20:30:51 +08:00
func _CommServer_Getrange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetrangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Getrange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Getrange",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Getrange(ctx, req.(*GetrangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Getset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetsetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Getset(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Getset",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Getset(ctx, req.(*GetsetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Strlen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StrlenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Strlen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Strlen",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Strlen(ctx, req.(*StrlenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_Setnx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetnxRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).Setnx(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/Setnx",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).Setnx(ctx, req.(*SetnxRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CommServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "CommServer",
HandlerType: (*CommServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Set",
Handler: _CommServer_Set_Handler,
},
{
MethodName: "Get",
Handler: _CommServer_Get_Handler,
},
{
MethodName: "Add",
Handler: _CommServer_Add_Handler,
},
{
MethodName: "Reduce",
Handler: _CommServer_Reduce_Handler,
},
{
MethodName: "Setbit",
Handler: _CommServer_Setbit_Handler,
},
{
MethodName: "Getbit",
Handler: _CommServer_Getbit_Handler,
},
2021-10-20 20:30:51 +08:00
{
MethodName: "Getrange",
Handler: _CommServer_Getrange_Handler,
},
{
MethodName: "Getset",
Handler: _CommServer_Getset_Handler,
},
{
MethodName: "Strlen",
Handler: _CommServer_Strlen_Handler,
},
{
MethodName: "Setnx",
Handler: _CommServer_Setnx_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "storage.proto",
}