Documentation ¶
Index ¶
Constants ¶
const (
Example_Do_FullMethodName = "/example.Example/Do"
)
Variables ¶
var Example_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.Example", HandlerType: (*ExampleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Do", Handler: _Example_Do_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "server/example/example.proto", }
Example_ServiceDesc is the grpc.ServiceDesc for Example service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_server_example_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServer ¶
func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
Types ¶
type ExampleClient ¶
type ExampleClient interface {
Do(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}
ExampleClient is the client API for Example 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 NewExampleClient ¶
func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient
type ExampleServer ¶
type ExampleServer interface { Do(context.Context, *Request) (*Response, error) // contains filtered or unexported methods }
ExampleServer is the server API for Example service. All implementations must embed UnimplementedExampleServer for forward compatibility.
type Request ¶
type Request struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetMessage ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedExampleServer ¶
type UnimplementedExampleServer struct{}
UnimplementedExampleServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeExampleServer ¶
type UnsafeExampleServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServer will result in compilation errors.