Documentation ¶
Index ¶
- Variables
- type Input
- type Output
- type Stub
- func (s *Stub) BidirectionalStream(ctx context.Context, in <-chan *Input, out chan<- *Output) error
- func (s *Stub) ClientStream(ctx context.Context, in <-chan *Input) (*Output, error)
- func (s *Stub) ServerStream(ctx context.Context, in *Input, out chan<- *Output) error
- func (s *Stub) Unary(ctx context.Context, in *Input) (*Output, error)
Constants ¶
This section is empty.
Variables ¶
var File_github_com_dogmatiq_protean_internal_testservice_service_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
Input is the message used as inputs to all of the RPC methods in the test service.
func (*Input) Descriptor
deprecated
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type Output ¶
type Output struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
Output is the message used as outputs from all of the RPC methods in the test service.
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type Stub ¶
type Stub struct { UnaryFunc func(context.Context, *Input) (*Output, error) ServerStreamFunc func(context.Context, *Input, chan<- *Output) error ClientStreamFunc func(context.Context, <-chan *Input) (*Output, error) BidirectionalStreamFunc func(context.Context, <-chan *Input, chan<- *Output) error }
Stub is a test implementation of the API interface.
func (*Stub) BidirectionalStream ¶
BidirectionalStream calls s.BidirectionalStreamFunc(ctx, in, out) if s.BidirectionalStreamFunc is not nil. Otherwise, it reads all of the input messages without producing any output messages.
func (*Stub) ClientStream ¶
ClientStream calls s.ClientStreamFunc(ctx, in) if s.ClientStreamFunc is not nil. Otherwise, it reads all the input messages and returns an empty output message.
func (*Stub) ServerStream ¶
ServerStream calls s.ServerStreamFunc(ctx, in, out) if s.ServerStreamFunc is not nil. Otherwise, it returns nil without producing any output messages.