v1

package
v1.20210221.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_calculator_proto protoreflect.FileDescriptor

Functions

func RegisterCalculatorServer

func RegisterCalculatorServer(s *grpc.Server, srv CalculatorServer)

Types

type CalculatorClient

type CalculatorClient interface {
	Add(ctx context.Context, in *Numbers, opts ...grpc.CallOption) (*Number, error)
	AddStream(ctx context.Context, opts ...grpc.CallOption) (Calculator_AddStreamClient, error)
	Subtract(ctx context.Context, in *Numbers, opts ...grpc.CallOption) (*Number, error)
	SubtractStream(ctx context.Context, opts ...grpc.CallOption) (Calculator_SubtractStreamClient, error)
	Multiply(ctx context.Context, in *Numbers, opts ...grpc.CallOption) (*Number, error)
	MultiplyStream(ctx context.Context, opts ...grpc.CallOption) (Calculator_MultiplyStreamClient, error)
	Divide(ctx context.Context, in *Numbers, opts ...grpc.CallOption) (*Number, error)
	DivideStream(ctx context.Context, opts ...grpc.CallOption) (Calculator_DivideStreamClient, error)
}

CalculatorClient is the client API for Calculator service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCalculatorClient

func NewCalculatorClient(cc grpc.ClientConnInterface) CalculatorClient

type CalculatorServer

type CalculatorServer interface {
	Add(context.Context, *Numbers) (*Number, error)
	AddStream(Calculator_AddStreamServer) error
	Subtract(context.Context, *Numbers) (*Number, error)
	SubtractStream(Calculator_SubtractStreamServer) error
	Multiply(context.Context, *Numbers) (*Number, error)
	MultiplyStream(Calculator_MultiplyStreamServer) error
	Divide(context.Context, *Numbers) (*Number, error)
	DivideStream(Calculator_DivideStreamServer) error
	// contains filtered or unexported methods
}

CalculatorServer is the server API for Calculator service. All implementations must embed UnimplementedCalculatorServer for forward compatibility

type Calculator_AddStreamClient

type Calculator_AddStreamClient interface {
	Send(*Number) error
	CloseAndRecv() (*Number, error)
	grpc.ClientStream
}

type Calculator_AddStreamServer

type Calculator_AddStreamServer interface {
	SendAndClose(*Number) error
	Recv() (*Number, error)
	grpc.ServerStream
}

type Calculator_DivideStreamClient

type Calculator_DivideStreamClient interface {
	Send(*Number) error
	CloseAndRecv() (*Number, error)
	grpc.ClientStream
}

type Calculator_DivideStreamServer

type Calculator_DivideStreamServer interface {
	SendAndClose(*Number) error
	Recv() (*Number, error)
	grpc.ServerStream
}

type Calculator_MultiplyStreamClient

type Calculator_MultiplyStreamClient interface {
	Send(*Number) error
	CloseAndRecv() (*Number, error)
	grpc.ClientStream
}

type Calculator_MultiplyStreamServer

type Calculator_MultiplyStreamServer interface {
	SendAndClose(*Number) error
	Recv() (*Number, error)
	grpc.ServerStream
}

type Calculator_SubtractStreamClient

type Calculator_SubtractStreamClient interface {
	Send(*Number) error
	CloseAndRecv() (*Number, error)
	grpc.ClientStream
}

type Calculator_SubtractStreamServer

type Calculator_SubtractStreamServer interface {
	SendAndClose(*Number) error
	Recv() (*Number, error)
	grpc.ServerStream
}

type Number

type Number struct {
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Number) Descriptor deprecated

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

Deprecated: Use Number.ProtoReflect.Descriptor instead.

func (*Number) GetValue

func (x *Number) GetValue() float64

func (*Number) ProtoMessage

func (*Number) ProtoMessage()

func (*Number) ProtoReflect

func (x *Number) ProtoReflect() protoreflect.Message

func (*Number) Reset

func (x *Number) Reset()

func (*Number) String

func (x *Number) String() string

type Numbers

type Numbers struct {
	Values []float64 `protobuf:"fixed64,1,rep,packed,name=Values,proto3" json:"Values,omitempty"`
	// contains filtered or unexported fields
}

func (*Numbers) Descriptor deprecated

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

Deprecated: Use Numbers.ProtoReflect.Descriptor instead.

func (*Numbers) GetValues

func (x *Numbers) GetValues() []float64

func (*Numbers) ProtoMessage

func (*Numbers) ProtoMessage()

func (*Numbers) ProtoReflect

func (x *Numbers) ProtoReflect() protoreflect.Message

func (*Numbers) Reset

func (x *Numbers) Reset()

func (*Numbers) String

func (x *Numbers) String() string

type UnimplementedCalculatorServer

type UnimplementedCalculatorServer struct {
}

UnimplementedCalculatorServer must be embedded to have forward compatible implementations.

func (*UnimplementedCalculatorServer) Add

func (*UnimplementedCalculatorServer) AddStream

func (*UnimplementedCalculatorServer) Divide

func (*UnimplementedCalculatorServer) DivideStream

func (*UnimplementedCalculatorServer) Multiply

func (*UnimplementedCalculatorServer) MultiplyStream

func (*UnimplementedCalculatorServer) Subtract

func (*UnimplementedCalculatorServer) SubtractStream

Jump to

Keyboard shortcuts

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