Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_say_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.say.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Say", Handler: _Service_Say_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "say.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type Req ¶
type Req struct {
// contains filtered or unexported fields
}
func (*Req) Descriptor
deprecated
func (*Req) ProtoMessage ¶
func (*Req) ProtoMessage()
func (*Req) ProtoReflect ¶
func (x *Req) ProtoReflect() protoreflect.Message
type Resp ¶
type Resp struct { Say string `protobuf:"bytes,1,opt,name=say,proto3" json:"say,omitempty"` // contains filtered or unexported fields }
func (*Resp) Descriptor
deprecated
func (*Resp) ProtoMessage ¶
func (*Resp) ProtoMessage()
func (*Resp) ProtoReflect ¶
func (x *Resp) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface {
Say(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
}
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Say(context.Context, *Req) (*Resp, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.