service

package
v0.0.0-...-be79e1c Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 9 Imported by: 0

README

protoc --gogofaster_out=plugins=grpc:. arith.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthArith        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowArith          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupArith = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterArithServiceServer

func RegisterArithServiceServer(s *grpc.Server, srv ArithServiceServer)

Types

type Arith

type Arith struct{}

Arith defines the struct of arith.

func (*Arith) Multiply

func (p *Arith) Multiply(ctx context.Context, req *ArithRequest) (*ArithResponse, error)

Multiply operation

type ArithRequest

type ArithRequest 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"`
}

func (*ArithRequest) Descriptor

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

func (*ArithRequest) GetA

func (m *ArithRequest) GetA() int32

func (*ArithRequest) GetB

func (m *ArithRequest) GetB() int32

func (*ArithRequest) Marshal

func (m *ArithRequest) Marshal() (dAtA []byte, err error)

func (*ArithRequest) MarshalTo

func (m *ArithRequest) MarshalTo(dAtA []byte) (int, error)

func (*ArithRequest) MarshalToSizedBuffer

func (m *ArithRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ArithRequest) ProtoMessage

func (*ArithRequest) ProtoMessage()

func (*ArithRequest) Reset

func (m *ArithRequest) Reset()

func (*ArithRequest) Size

func (m *ArithRequest) Size() (n int)

func (*ArithRequest) String

func (m *ArithRequest) String() string

func (*ArithRequest) Unmarshal

func (m *ArithRequest) Unmarshal(dAtA []byte) error

func (*ArithRequest) XXX_DiscardUnknown

func (m *ArithRequest) XXX_DiscardUnknown()

func (*ArithRequest) XXX_Marshal

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

func (*ArithRequest) XXX_Merge

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

func (*ArithRequest) XXX_Size

func (m *ArithRequest) XXX_Size() int

func (*ArithRequest) XXX_Unmarshal

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

type ArithResponse

type ArithResponse struct {
	Pro int32 `protobuf:"varint,1,opt,name=pro,proto3" json:"pro,omitempty"`
}

func (*ArithResponse) Descriptor

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

func (*ArithResponse) GetPro

func (m *ArithResponse) GetPro() int32

func (*ArithResponse) Marshal

func (m *ArithResponse) Marshal() (dAtA []byte, err error)

func (*ArithResponse) MarshalTo

func (m *ArithResponse) MarshalTo(dAtA []byte) (int, error)

func (*ArithResponse) MarshalToSizedBuffer

func (m *ArithResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ArithResponse) ProtoMessage

func (*ArithResponse) ProtoMessage()

func (*ArithResponse) Reset

func (m *ArithResponse) Reset()

func (*ArithResponse) Size

func (m *ArithResponse) Size() (n int)

func (*ArithResponse) String

func (m *ArithResponse) String() string

func (*ArithResponse) Unmarshal

func (m *ArithResponse) Unmarshal(dAtA []byte) error

func (*ArithResponse) XXX_DiscardUnknown

func (m *ArithResponse) XXX_DiscardUnknown()

func (*ArithResponse) XXX_Marshal

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

func (*ArithResponse) XXX_Merge

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

func (*ArithResponse) XXX_Size

func (m *ArithResponse) XXX_Size() int

func (*ArithResponse) XXX_Unmarshal

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

type ArithServiceClient

type ArithServiceClient interface {
	Multiply(ctx context.Context, in *ArithRequest, opts ...grpc.CallOption) (*ArithResponse, error)
}

ArithServiceClient is the client API for ArithService service.

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

func NewArithServiceClient

func NewArithServiceClient(cc *grpc.ClientConn) ArithServiceClient

type ArithServiceServer

type ArithServiceServer interface {
	Multiply(context.Context, *ArithRequest) (*ArithResponse, error)
}

ArithServiceServer is the server API for ArithService service.

type UnimplementedArithServiceServer

type UnimplementedArithServiceServer struct {
}

UnimplementedArithServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedArithServiceServer) Multiply

Jump to

Keyboard shortcuts

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