Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_test_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFooServer ¶
func RegisterFooServer(s grpc.ServiceRegistrar, srv FooServer)
Types ¶
type FooClient ¶
type FooClient interface { Single(ctx context.Context, in *FooRequest, opts ...grpc.CallOption) (*FooResponse, error) Multiple(ctx context.Context, opts ...grpc.CallOption) (Foo_MultipleClient, error) }
FooClient is the client API for Foo 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 NewFooClient ¶
func NewFooClient(cc grpc.ClientConnInterface) FooClient
func NewTestClient ¶
NewTestClient is used for internal testing only. It creates a grpc server and client. It returns client and cleanup function to close the connection and gracefully stop the server.
type FooRequest ¶
type FooRequest struct { Fail bool `protobuf:"varint,1,opt,name=fail,proto3" json:"fail,omitempty"` SleepNanos int64 `protobuf:"varint,2,opt,name=sleep_nanos,json=sleepNanos,proto3" json:"sleep_nanos,omitempty"` // contains filtered or unexported fields }
func (*FooRequest) Descriptor
deprecated
func (*FooRequest) Descriptor() ([]byte, []int)
Deprecated: Use FooRequest.ProtoReflect.Descriptor instead.
func (*FooRequest) GetFail ¶
func (x *FooRequest) GetFail() bool
func (*FooRequest) GetSleepNanos ¶
func (x *FooRequest) GetSleepNanos() int64
func (*FooRequest) ProtoMessage ¶
func (*FooRequest) ProtoMessage()
func (*FooRequest) ProtoReflect ¶ added in v0.13.6
func (x *FooRequest) ProtoReflect() protoreflect.Message
func (*FooRequest) Reset ¶
func (x *FooRequest) Reset()
func (*FooRequest) String ¶
func (x *FooRequest) String() string
type FooResponse ¶
type FooResponse struct {
// contains filtered or unexported fields
}
func (*FooResponse) Descriptor
deprecated
func (*FooResponse) Descriptor() ([]byte, []int)
Deprecated: Use FooResponse.ProtoReflect.Descriptor instead.
func (*FooResponse) ProtoMessage ¶
func (*FooResponse) ProtoMessage()
func (*FooResponse) ProtoReflect ¶ added in v0.13.6
func (x *FooResponse) ProtoReflect() protoreflect.Message
func (*FooResponse) Reset ¶
func (x *FooResponse) Reset()
func (*FooResponse) String ¶
func (x *FooResponse) String() string
type FooServer ¶
type FooServer interface { Single(context.Context, *FooRequest) (*FooResponse, error) Multiple(Foo_MultipleServer) error // contains filtered or unexported methods }
FooServer is the server API for Foo service. All implementations must embed UnimplementedFooServer for forward compatibility
type Foo_MultipleClient ¶
type Foo_MultipleClient interface { Send(*FooRequest) error Recv() (*FooResponse, error) grpc.ClientStream }
type Foo_MultipleServer ¶
type Foo_MultipleServer interface { Send(*FooResponse) error Recv() (*FooRequest, error) grpc.ServerStream }
type UnimplementedFooServer ¶ added in v0.13.6
type UnimplementedFooServer struct { }
UnimplementedFooServer must be embedded to have forward compatible implementations.
func (UnimplementedFooServer) Multiple ¶ added in v0.13.6
func (UnimplementedFooServer) Multiple(Foo_MultipleServer) error
func (UnimplementedFooServer) Single ¶ added in v0.13.6
func (UnimplementedFooServer) Single(context.Context, *FooRequest) (*FooResponse, error)
type UnsafeFooServer ¶ added in v0.13.6
type UnsafeFooServer interface {
// contains filtered or unexported methods
}
UnsafeFooServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooServer will result in compilation errors.