Documentation ¶
Index ¶
- func RegisterCalculatorServer(s *grpc.Server, srv CalculatorServer)
- type CalculatorAddRequest
- func (*CalculatorAddRequest) Descriptor() ([]byte, []int)
- func (m *CalculatorAddRequest) GetA() int32
- func (m *CalculatorAddRequest) GetB() int32
- func (*CalculatorAddRequest) ProtoMessage()
- func (m *CalculatorAddRequest) Reset()
- func (m *CalculatorAddRequest) String() string
- func (m *CalculatorAddRequest) XXX_DiscardUnknown()
- func (m *CalculatorAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorAddRequest) XXX_Merge(src proto.Message)
- func (m *CalculatorAddRequest) XXX_Size() int
- func (m *CalculatorAddRequest) XXX_Unmarshal(b []byte) error
- type CalculatorClient
- type CalculatorDivRequest
- func (*CalculatorDivRequest) Descriptor() ([]byte, []int)
- func (m *CalculatorDivRequest) GetM() int32
- func (m *CalculatorDivRequest) GetN() int32
- func (*CalculatorDivRequest) ProtoMessage()
- func (m *CalculatorDivRequest) Reset()
- func (m *CalculatorDivRequest) String() string
- func (m *CalculatorDivRequest) XXX_DiscardUnknown()
- func (m *CalculatorDivRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorDivRequest) XXX_Merge(src proto.Message)
- func (m *CalculatorDivRequest) XXX_Size() int
- func (m *CalculatorDivRequest) XXX_Unmarshal(b []byte) error
- type CalculatorFloatResponse
- func (*CalculatorFloatResponse) Descriptor() ([]byte, []int)
- func (m *CalculatorFloatResponse) GetResult() float32
- func (*CalculatorFloatResponse) ProtoMessage()
- func (m *CalculatorFloatResponse) Reset()
- func (m *CalculatorFloatResponse) String() string
- func (m *CalculatorFloatResponse) XXX_DiscardUnknown()
- func (m *CalculatorFloatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorFloatResponse) XXX_Merge(src proto.Message)
- func (m *CalculatorFloatResponse) XXX_Size() int
- func (m *CalculatorFloatResponse) XXX_Unmarshal(b []byte) error
- type CalculatorInt32Response
- func (*CalculatorInt32Response) Descriptor() ([]byte, []int)
- func (m *CalculatorInt32Response) GetResult() int32
- func (*CalculatorInt32Response) ProtoMessage()
- func (m *CalculatorInt32Response) Reset()
- func (m *CalculatorInt32Response) String() string
- func (m *CalculatorInt32Response) XXX_DiscardUnknown()
- func (m *CalculatorInt32Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorInt32Response) XXX_Merge(src proto.Message)
- func (m *CalculatorInt32Response) XXX_Size() int
- func (m *CalculatorInt32Response) XXX_Unmarshal(b []byte) error
- type CalculatorMulRequest
- func (*CalculatorMulRequest) Descriptor() ([]byte, []int)
- func (m *CalculatorMulRequest) GetE() int32
- func (m *CalculatorMulRequest) GetF() int32
- func (*CalculatorMulRequest) ProtoMessage()
- func (m *CalculatorMulRequest) Reset()
- func (m *CalculatorMulRequest) String() string
- func (m *CalculatorMulRequest) XXX_DiscardUnknown()
- func (m *CalculatorMulRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorMulRequest) XXX_Merge(src proto.Message)
- func (m *CalculatorMulRequest) XXX_Size() int
- func (m *CalculatorMulRequest) XXX_Unmarshal(b []byte) error
- type CalculatorServer
- type CalculatorSubRequest
- func (*CalculatorSubRequest) Descriptor() ([]byte, []int)
- func (m *CalculatorSubRequest) GetC() int32
- func (m *CalculatorSubRequest) GetD() int32
- func (*CalculatorSubRequest) ProtoMessage()
- func (m *CalculatorSubRequest) Reset()
- func (m *CalculatorSubRequest) String() string
- func (m *CalculatorSubRequest) XXX_DiscardUnknown()
- func (m *CalculatorSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CalculatorSubRequest) XXX_Merge(src proto.Message)
- func (m *CalculatorSubRequest) XXX_Size() int
- func (m *CalculatorSubRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedCalculatorServer
- func (*UnimplementedCalculatorServer) Add(ctx context.Context, req *CalculatorAddRequest) (*CalculatorInt32Response, error)
- func (*UnimplementedCalculatorServer) Div(ctx context.Context, req *CalculatorDivRequest) (*CalculatorFloatResponse, error)
- func (*UnimplementedCalculatorServer) Mul(ctx context.Context, req *CalculatorMulRequest) (*CalculatorInt32Response, error)
- func (*UnimplementedCalculatorServer) Sub(ctx context.Context, req *CalculatorSubRequest) (*CalculatorInt32Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCalculatorServer ¶
func RegisterCalculatorServer(s *grpc.Server, srv CalculatorServer)
Types ¶
type CalculatorAddRequest ¶
type CalculatorAddRequest struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorAddRequest) Descriptor ¶
func (*CalculatorAddRequest) Descriptor() ([]byte, []int)
func (*CalculatorAddRequest) GetA ¶
func (m *CalculatorAddRequest) GetA() int32
func (*CalculatorAddRequest) GetB ¶
func (m *CalculatorAddRequest) GetB() int32
func (*CalculatorAddRequest) ProtoMessage ¶
func (*CalculatorAddRequest) ProtoMessage()
func (*CalculatorAddRequest) Reset ¶
func (m *CalculatorAddRequest) Reset()
func (*CalculatorAddRequest) String ¶
func (m *CalculatorAddRequest) String() string
func (*CalculatorAddRequest) XXX_DiscardUnknown ¶
func (m *CalculatorAddRequest) XXX_DiscardUnknown()
func (*CalculatorAddRequest) XXX_Marshal ¶
func (m *CalculatorAddRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorAddRequest) XXX_Merge ¶
func (m *CalculatorAddRequest) XXX_Merge(src proto.Message)
func (*CalculatorAddRequest) XXX_Size ¶
func (m *CalculatorAddRequest) XXX_Size() int
func (*CalculatorAddRequest) XXX_Unmarshal ¶
func (m *CalculatorAddRequest) XXX_Unmarshal(b []byte) error
type CalculatorClient ¶
type CalculatorClient interface { Add(ctx context.Context, in *CalculatorAddRequest, opts ...grpc.CallOption) (*CalculatorInt32Response, error) Sub(ctx context.Context, in *CalculatorSubRequest, opts ...grpc.CallOption) (*CalculatorInt32Response, error) Mul(ctx context.Context, in *CalculatorMulRequest, opts ...grpc.CallOption) (*CalculatorInt32Response, error) Div(ctx context.Context, in *CalculatorDivRequest, opts ...grpc.CallOption) (*CalculatorFloatResponse, error) }
CalculatorClient is the client API for Calculator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCalculatorClient ¶
func NewCalculatorClient(cc *grpc.ClientConn) CalculatorClient
type CalculatorDivRequest ¶
type CalculatorDivRequest struct { M int32 `protobuf:"varint,1,opt,name=m,proto3" json:"m,omitempty"` N int32 `protobuf:"varint,2,opt,name=n,proto3" json:"n,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorDivRequest) Descriptor ¶
func (*CalculatorDivRequest) Descriptor() ([]byte, []int)
func (*CalculatorDivRequest) GetM ¶
func (m *CalculatorDivRequest) GetM() int32
func (*CalculatorDivRequest) GetN ¶
func (m *CalculatorDivRequest) GetN() int32
func (*CalculatorDivRequest) ProtoMessage ¶
func (*CalculatorDivRequest) ProtoMessage()
func (*CalculatorDivRequest) Reset ¶
func (m *CalculatorDivRequest) Reset()
func (*CalculatorDivRequest) String ¶
func (m *CalculatorDivRequest) String() string
func (*CalculatorDivRequest) XXX_DiscardUnknown ¶
func (m *CalculatorDivRequest) XXX_DiscardUnknown()
func (*CalculatorDivRequest) XXX_Marshal ¶
func (m *CalculatorDivRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorDivRequest) XXX_Merge ¶
func (m *CalculatorDivRequest) XXX_Merge(src proto.Message)
func (*CalculatorDivRequest) XXX_Size ¶
func (m *CalculatorDivRequest) XXX_Size() int
func (*CalculatorDivRequest) XXX_Unmarshal ¶
func (m *CalculatorDivRequest) XXX_Unmarshal(b []byte) error
type CalculatorFloatResponse ¶
type CalculatorFloatResponse struct { Result float32 `protobuf:"fixed32,1,opt,name=result,proto3" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorFloatResponse) Descriptor ¶
func (*CalculatorFloatResponse) Descriptor() ([]byte, []int)
func (*CalculatorFloatResponse) GetResult ¶
func (m *CalculatorFloatResponse) GetResult() float32
func (*CalculatorFloatResponse) ProtoMessage ¶
func (*CalculatorFloatResponse) ProtoMessage()
func (*CalculatorFloatResponse) Reset ¶
func (m *CalculatorFloatResponse) Reset()
func (*CalculatorFloatResponse) String ¶
func (m *CalculatorFloatResponse) String() string
func (*CalculatorFloatResponse) XXX_DiscardUnknown ¶
func (m *CalculatorFloatResponse) XXX_DiscardUnknown()
func (*CalculatorFloatResponse) XXX_Marshal ¶
func (m *CalculatorFloatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorFloatResponse) XXX_Merge ¶
func (m *CalculatorFloatResponse) XXX_Merge(src proto.Message)
func (*CalculatorFloatResponse) XXX_Size ¶
func (m *CalculatorFloatResponse) XXX_Size() int
func (*CalculatorFloatResponse) XXX_Unmarshal ¶
func (m *CalculatorFloatResponse) XXX_Unmarshal(b []byte) error
type CalculatorInt32Response ¶
type CalculatorInt32Response struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorInt32Response) Descriptor ¶
func (*CalculatorInt32Response) Descriptor() ([]byte, []int)
func (*CalculatorInt32Response) GetResult ¶
func (m *CalculatorInt32Response) GetResult() int32
func (*CalculatorInt32Response) ProtoMessage ¶
func (*CalculatorInt32Response) ProtoMessage()
func (*CalculatorInt32Response) Reset ¶
func (m *CalculatorInt32Response) Reset()
func (*CalculatorInt32Response) String ¶
func (m *CalculatorInt32Response) String() string
func (*CalculatorInt32Response) XXX_DiscardUnknown ¶
func (m *CalculatorInt32Response) XXX_DiscardUnknown()
func (*CalculatorInt32Response) XXX_Marshal ¶
func (m *CalculatorInt32Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorInt32Response) XXX_Merge ¶
func (m *CalculatorInt32Response) XXX_Merge(src proto.Message)
func (*CalculatorInt32Response) XXX_Size ¶
func (m *CalculatorInt32Response) XXX_Size() int
func (*CalculatorInt32Response) XXX_Unmarshal ¶
func (m *CalculatorInt32Response) XXX_Unmarshal(b []byte) error
type CalculatorMulRequest ¶
type CalculatorMulRequest struct { E int32 `protobuf:"varint,1,opt,name=e,proto3" json:"e,omitempty"` F int32 `protobuf:"varint,2,opt,name=f,proto3" json:"f,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorMulRequest) Descriptor ¶
func (*CalculatorMulRequest) Descriptor() ([]byte, []int)
func (*CalculatorMulRequest) GetE ¶
func (m *CalculatorMulRequest) GetE() int32
func (*CalculatorMulRequest) GetF ¶
func (m *CalculatorMulRequest) GetF() int32
func (*CalculatorMulRequest) ProtoMessage ¶
func (*CalculatorMulRequest) ProtoMessage()
func (*CalculatorMulRequest) Reset ¶
func (m *CalculatorMulRequest) Reset()
func (*CalculatorMulRequest) String ¶
func (m *CalculatorMulRequest) String() string
func (*CalculatorMulRequest) XXX_DiscardUnknown ¶
func (m *CalculatorMulRequest) XXX_DiscardUnknown()
func (*CalculatorMulRequest) XXX_Marshal ¶
func (m *CalculatorMulRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorMulRequest) XXX_Merge ¶
func (m *CalculatorMulRequest) XXX_Merge(src proto.Message)
func (*CalculatorMulRequest) XXX_Size ¶
func (m *CalculatorMulRequest) XXX_Size() int
func (*CalculatorMulRequest) XXX_Unmarshal ¶
func (m *CalculatorMulRequest) XXX_Unmarshal(b []byte) error
type CalculatorServer ¶
type CalculatorServer interface { Add(context.Context, *CalculatorAddRequest) (*CalculatorInt32Response, error) Sub(context.Context, *CalculatorSubRequest) (*CalculatorInt32Response, error) Mul(context.Context, *CalculatorMulRequest) (*CalculatorInt32Response, error) Div(context.Context, *CalculatorDivRequest) (*CalculatorFloatResponse, error) }
CalculatorServer is the server API for Calculator service.
type CalculatorSubRequest ¶
type CalculatorSubRequest struct { C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` D int32 `protobuf:"varint,2,opt,name=d,proto3" json:"d,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CalculatorSubRequest) Descriptor ¶
func (*CalculatorSubRequest) Descriptor() ([]byte, []int)
func (*CalculatorSubRequest) GetC ¶
func (m *CalculatorSubRequest) GetC() int32
func (*CalculatorSubRequest) GetD ¶
func (m *CalculatorSubRequest) GetD() int32
func (*CalculatorSubRequest) ProtoMessage ¶
func (*CalculatorSubRequest) ProtoMessage()
func (*CalculatorSubRequest) Reset ¶
func (m *CalculatorSubRequest) Reset()
func (*CalculatorSubRequest) String ¶
func (m *CalculatorSubRequest) String() string
func (*CalculatorSubRequest) XXX_DiscardUnknown ¶
func (m *CalculatorSubRequest) XXX_DiscardUnknown()
func (*CalculatorSubRequest) XXX_Marshal ¶
func (m *CalculatorSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CalculatorSubRequest) XXX_Merge ¶
func (m *CalculatorSubRequest) XXX_Merge(src proto.Message)
func (*CalculatorSubRequest) XXX_Size ¶
func (m *CalculatorSubRequest) XXX_Size() int
func (*CalculatorSubRequest) XXX_Unmarshal ¶
func (m *CalculatorSubRequest) XXX_Unmarshal(b []byte) error
type UnimplementedCalculatorServer ¶
type UnimplementedCalculatorServer struct { }
UnimplementedCalculatorServer can be embedded to have forward compatible implementations.
func (*UnimplementedCalculatorServer) Add ¶
func (*UnimplementedCalculatorServer) Add(ctx context.Context, req *CalculatorAddRequest) (*CalculatorInt32Response, error)
func (*UnimplementedCalculatorServer) Div ¶
func (*UnimplementedCalculatorServer) Div(ctx context.Context, req *CalculatorDivRequest) (*CalculatorFloatResponse, error)
func (*UnimplementedCalculatorServer) Mul ¶
func (*UnimplementedCalculatorServer) Mul(ctx context.Context, req *CalculatorMulRequest) (*CalculatorInt32Response, error)
func (*UnimplementedCalculatorServer) Sub ¶
func (*UnimplementedCalculatorServer) Sub(ctx context.Context, req *CalculatorSubRequest) (*CalculatorInt32Response, error)
Click to show internal directories.
Click to hide internal directories.