Documentation ¶
Index ¶
- Variables
- func RegisterFooBarServer(s grpc.ServiceRegistrar, srv FooBarServer)
- type Bar
- type Foo
- type FooBarClient
- type FooBarExampleServer
- func (s *FooBarExampleServer) BidiStream(stream FooBar_BidiStreamServer) error
- func (s *FooBarExampleServer) ClientStream(stream FooBar_ClientStreamServer) error
- func (s *FooBarExampleServer) ServerStream(foo *Foo, stream FooBar_ServerStreamServer) error
- func (s *FooBarExampleServer) Unary(ctx context.Context, foo *Foo) (*Bar, error)
- type FooBarServer
- type FooBar_BidiStreamClient
- type FooBar_BidiStreamServer
- type FooBar_ClientStreamClient
- type FooBar_ClientStreamServer
- type FooBar_ServerStreamClient
- type FooBar_ServerStreamServer
- type UnimplementedFooBarServer
- func (UnimplementedFooBarServer) BidiStream(FooBar_BidiStreamServer) error
- func (UnimplementedFooBarServer) ClientStream(FooBar_ClientStreamServer) error
- func (UnimplementedFooBarServer) ServerStream(*Foo, FooBar_ServerStreamServer) error
- func (UnimplementedFooBarServer) Unary(context.Context, *Foo) (*Bar, error)
- type UnsafeFooBarServer
Constants ¶
This section is empty.
Variables ¶
var File_rpctest_proto protoreflect.FileDescriptor
var FooBar_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpctest.FooBar", HandlerType: (*FooBarServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Unary", Handler: _FooBar_Unary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ClientStream", Handler: _FooBar_ClientStream_Handler, ClientStreams: true, }, { StreamName: "ServerStream", Handler: _FooBar_ServerStream_Handler, ServerStreams: true, }, { StreamName: "BidiStream", Handler: _FooBar_BidiStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "rpctest.proto", }
FooBar_ServiceDesc is the grpc.ServiceDesc for FooBar service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFooBarServer ¶
func RegisterFooBarServer(s grpc.ServiceRegistrar, srv FooBarServer)
Types ¶
type Bar ¶
type Bar struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Bar) Descriptor
deprecated
func (*Bar) GetMessage ¶
func (*Bar) ProtoMessage ¶
func (*Bar) ProtoMessage()
func (*Bar) ProtoReflect ¶ added in v3.25.0
func (x *Bar) ProtoReflect() protoreflect.Message
type Foo ¶
type Foo struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Foo) Descriptor
deprecated
func (*Foo) GetMessage ¶
func (*Foo) ProtoMessage ¶
func (*Foo) ProtoMessage()
func (*Foo) ProtoReflect ¶ added in v3.25.0
func (x *Foo) ProtoReflect() protoreflect.Message
type FooBarClient ¶
type FooBarClient interface { Unary(ctx context.Context, in *Foo, opts ...grpc.CallOption) (*Bar, error) ClientStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_ClientStreamClient, error) ServerStream(ctx context.Context, in *Foo, opts ...grpc.CallOption) (FooBar_ServerStreamClient, error) BidiStream(ctx context.Context, opts ...grpc.CallOption) (FooBar_BidiStreamClient, error) }
FooBarClient is the client API for FooBar 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 NewFooBarClient ¶
func NewFooBarClient(cc grpc.ClientConnInterface) FooBarClient
type FooBarExampleServer ¶
type FooBarExampleServer struct {
UnimplementedFooBarServer
}
The FooBarExampleServer is an example/test server
func (*FooBarExampleServer) BidiStream ¶
func (s *FooBarExampleServer) BidiStream(stream FooBar_BidiStreamServer) error
BidiStream RPC example
func (*FooBarExampleServer) ClientStream ¶
func (s *FooBarExampleServer) ClientStream(stream FooBar_ClientStreamServer) error
ClientStream RPC example
func (*FooBarExampleServer) ServerStream ¶
func (s *FooBarExampleServer) ServerStream(foo *Foo, stream FooBar_ServerStreamServer) error
ServerStream RPC example
type FooBarServer ¶
type FooBarServer interface { Unary(context.Context, *Foo) (*Bar, error) ClientStream(FooBar_ClientStreamServer) error ServerStream(*Foo, FooBar_ServerStreamServer) error BidiStream(FooBar_BidiStreamServer) error // contains filtered or unexported methods }
FooBarServer is the server API for FooBar service. All implementations must embed UnimplementedFooBarServer for forward compatibility
type FooBar_BidiStreamClient ¶
type FooBar_BidiStreamServer ¶
type FooBar_ServerStreamClient ¶
type FooBar_ServerStreamClient interface { Recv() (*Bar, error) grpc.ClientStream }
type FooBar_ServerStreamServer ¶
type FooBar_ServerStreamServer interface { Send(*Bar) error grpc.ServerStream }
type UnimplementedFooBarServer ¶ added in v3.16.2
type UnimplementedFooBarServer struct { }
UnimplementedFooBarServer must be embedded to have forward compatible implementations.
func (UnimplementedFooBarServer) BidiStream ¶ added in v3.16.2
func (UnimplementedFooBarServer) BidiStream(FooBar_BidiStreamServer) error
func (UnimplementedFooBarServer) ClientStream ¶ added in v3.16.2
func (UnimplementedFooBarServer) ClientStream(FooBar_ClientStreamServer) error
func (UnimplementedFooBarServer) ServerStream ¶ added in v3.16.2
func (UnimplementedFooBarServer) ServerStream(*Foo, FooBar_ServerStreamServer) error
type UnsafeFooBarServer ¶ added in v3.25.0
type UnsafeFooBarServer interface {
// contains filtered or unexported methods
}
UnsafeFooBarServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooBarServer will result in compilation errors.