Documentation ¶
Index ¶
- func RegisterMathServer(s *grpc.Server, srv MathServer)
- type MathClient
- type MathOpReply
- func (*MathOpReply) Descriptor() ([]byte, []int)
- func (m *MathOpReply) GetErr() string
- func (m *MathOpReply) GetV() float64
- func (*MathOpReply) ProtoMessage()
- func (m *MathOpReply) Reset()
- func (m *MathOpReply) String() string
- func (m *MathOpReply) XXX_DiscardUnknown()
- func (m *MathOpReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MathOpReply) XXX_Merge(src proto.Message)
- func (m *MathOpReply) XXX_Size() int
- func (m *MathOpReply) XXX_Unmarshal(b []byte) error
- type MathOpRequest
- func (*MathOpRequest) Descriptor() ([]byte, []int)
- func (m *MathOpRequest) GetA() float64
- func (m *MathOpRequest) GetB() float64
- func (*MathOpRequest) ProtoMessage()
- func (m *MathOpRequest) Reset()
- func (m *MathOpRequest) String() string
- func (m *MathOpRequest) XXX_DiscardUnknown()
- func (m *MathOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MathOpRequest) XXX_Merge(src proto.Message)
- func (m *MathOpRequest) XXX_Size() int
- func (m *MathOpRequest) XXX_Unmarshal(b []byte) error
- type MathServer
- type UnimplementedMathServer
- func (*UnimplementedMathServer) Divide(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Max(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Min(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Multiply(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Pow(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Subtract(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
- func (*UnimplementedMathServer) Sum(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMathServer ¶
func RegisterMathServer(s *grpc.Server, srv MathServer)
Types ¶
type MathClient ¶
type MathClient interface { // Divide two integers, a/b Divide(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Max two integers, returns the greater value of a and b Max(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Min two integers, returns the lesser value of a and b Min(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Multiply two integers, a*b Multiply(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Pow two integers, a^b Pow(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Subtract two integers, a-b Subtract(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) // Sums two integers. a+b Sum(ctx context.Context, in *MathOpRequest, opts ...grpc.CallOption) (*MathOpReply, error) }
MathClient is the client API for Math service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMathClient ¶
func NewMathClient(cc *grpc.ClientConn) MathClient
type MathOpReply ¶
type MathOpReply struct { V float64 `protobuf:"fixed64,1,opt,name=v,proto3" json:"v,omitempty"` Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MathOpReply) Descriptor ¶
func (*MathOpReply) Descriptor() ([]byte, []int)
func (*MathOpReply) GetErr ¶
func (m *MathOpReply) GetErr() string
func (*MathOpReply) GetV ¶
func (m *MathOpReply) GetV() float64
func (*MathOpReply) ProtoMessage ¶
func (*MathOpReply) ProtoMessage()
func (*MathOpReply) Reset ¶
func (m *MathOpReply) Reset()
func (*MathOpReply) String ¶
func (m *MathOpReply) String() string
func (*MathOpReply) XXX_DiscardUnknown ¶
func (m *MathOpReply) XXX_DiscardUnknown()
func (*MathOpReply) XXX_Marshal ¶
func (m *MathOpReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MathOpReply) XXX_Merge ¶
func (m *MathOpReply) XXX_Merge(src proto.Message)
func (*MathOpReply) XXX_Size ¶
func (m *MathOpReply) XXX_Size() int
func (*MathOpReply) XXX_Unmarshal ¶
func (m *MathOpReply) XXX_Unmarshal(b []byte) error
type MathOpRequest ¶
type MathOpRequest struct { A float64 `protobuf:"fixed64,1,opt,name=a,proto3" json:"a,omitempty"` B float64 `protobuf:"fixed64,2,opt,name=b,proto3" json:"b,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MathOpRequest) Descriptor ¶
func (*MathOpRequest) Descriptor() ([]byte, []int)
func (*MathOpRequest) GetA ¶
func (m *MathOpRequest) GetA() float64
func (*MathOpRequest) GetB ¶
func (m *MathOpRequest) GetB() float64
func (*MathOpRequest) ProtoMessage ¶
func (*MathOpRequest) ProtoMessage()
func (*MathOpRequest) Reset ¶
func (m *MathOpRequest) Reset()
func (*MathOpRequest) String ¶
func (m *MathOpRequest) String() string
func (*MathOpRequest) XXX_DiscardUnknown ¶
func (m *MathOpRequest) XXX_DiscardUnknown()
func (*MathOpRequest) XXX_Marshal ¶
func (m *MathOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MathOpRequest) XXX_Merge ¶
func (m *MathOpRequest) XXX_Merge(src proto.Message)
func (*MathOpRequest) XXX_Size ¶
func (m *MathOpRequest) XXX_Size() int
func (*MathOpRequest) XXX_Unmarshal ¶
func (m *MathOpRequest) XXX_Unmarshal(b []byte) error
type MathServer ¶
type MathServer interface { // Divide two integers, a/b Divide(context.Context, *MathOpRequest) (*MathOpReply, error) // Max two integers, returns the greater value of a and b Max(context.Context, *MathOpRequest) (*MathOpReply, error) // Min two integers, returns the lesser value of a and b Min(context.Context, *MathOpRequest) (*MathOpReply, error) // Multiply two integers, a*b Multiply(context.Context, *MathOpRequest) (*MathOpReply, error) // Pow two integers, a^b Pow(context.Context, *MathOpRequest) (*MathOpReply, error) // Subtract two integers, a-b Subtract(context.Context, *MathOpRequest) (*MathOpReply, error) // Sums two integers. a+b Sum(context.Context, *MathOpRequest) (*MathOpReply, error) }
MathServer is the server API for Math service.
type UnimplementedMathServer ¶
type UnimplementedMathServer struct { }
UnimplementedMathServer can be embedded to have forward compatible implementations.
func (*UnimplementedMathServer) Divide ¶
func (*UnimplementedMathServer) Divide(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Max ¶
func (*UnimplementedMathServer) Max(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Min ¶
func (*UnimplementedMathServer) Min(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Multiply ¶
func (*UnimplementedMathServer) Multiply(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Pow ¶
func (*UnimplementedMathServer) Pow(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Subtract ¶
func (*UnimplementedMathServer) Subtract(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
func (*UnimplementedMathServer) Sum ¶
func (*UnimplementedMathServer) Sum(ctx context.Context, req *MathOpRequest) (*MathOpReply, error)
Click to show internal directories.
Click to hide internal directories.