protoc

package
v0.0.0-...-849f898 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCalcServer

func RegisterCalcServer(s *grpc.Server, srv CalcServer)

Types

type CalcClient

type CalcClient interface {
	Sum(ctx context.Context, in *SumReq, opts ...grpc.CallOption) (*SumResp, error)
}

CalcClient is the client API for Calc service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCalcClient

func NewCalcClient(cc *grpc.ClientConn) CalcClient

type CalcServer

type CalcServer interface {
	Sum(context.Context, *SumReq) (*SumResp, error)
}

CalcServer is the server API for Calc service.

type SumReq

type SumReq 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 (*SumReq) Descriptor

func (*SumReq) Descriptor() ([]byte, []int)

func (*SumReq) GetA

func (m *SumReq) GetA() int32

func (*SumReq) GetB

func (m *SumReq) GetB() int32

func (*SumReq) ProtoMessage

func (*SumReq) ProtoMessage()

func (*SumReq) Reset

func (m *SumReq) Reset()

func (*SumReq) String

func (m *SumReq) String() string

func (*SumReq) XXX_DiscardUnknown

func (m *SumReq) XXX_DiscardUnknown()

func (*SumReq) XXX_Marshal

func (m *SumReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SumReq) XXX_Merge

func (m *SumReq) XXX_Merge(src proto.Message)

func (*SumReq) XXX_Size

func (m *SumReq) XXX_Size() int

func (*SumReq) XXX_Unmarshal

func (m *SumReq) XXX_Unmarshal(b []byte) error

type SumResp

type SumResp struct {
	S                    int32    `protobuf:"varint,1,opt,name=s,proto3" json:"s,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SumResp) Descriptor

func (*SumResp) Descriptor() ([]byte, []int)

func (*SumResp) GetS

func (m *SumResp) GetS() int32

func (*SumResp) ProtoMessage

func (*SumResp) ProtoMessage()

func (*SumResp) Reset

func (m *SumResp) Reset()

func (*SumResp) String

func (m *SumResp) String() string

func (*SumResp) XXX_DiscardUnknown

func (m *SumResp) XXX_DiscardUnknown()

func (*SumResp) XXX_Marshal

func (m *SumResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SumResp) XXX_Merge

func (m *SumResp) XXX_Merge(src proto.Message)

func (*SumResp) XXX_Size

func (m *SumResp) XXX_Size() int

func (*SumResp) XXX_Unmarshal

func (m *SumResp) XXX_Unmarshal(b []byte) error

type UnimplementedCalcServer

type UnimplementedCalcServer struct {
}

UnimplementedCalcServer can be embedded to have forward compatible implementations.

func (*UnimplementedCalcServer) Sum

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL