Documentation
¶
Index ¶
- Variables
- func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
- func RegisterChatServiceServerWithGofr(app *gofr.App, srv ChatServiceServerWithGofr)
- type ChatServiceClient
- type ChatServiceGoFrServer
- func (s *ChatServiceGoFrServer) BiDiStream(ctx *gofr.Context, stream ChatService_BiDiStreamServer) error
- func (s *ChatServiceGoFrServer) ClientStream(ctx *gofr.Context, stream ChatService_ClientStreamServer) error
- func (s *ChatServiceGoFrServer) ServerStream(ctx *gofr.Context, stream ChatService_ServerStreamServer) error
- type ChatServiceServer
- type ChatServiceServerWithGofr
- type ChatServiceServerWrapper
- func (h *ChatServiceServerWrapper) BiDiStream(stream ChatService_BiDiStreamServer) error
- func (h ChatServiceServerWrapper) Check(ctx *gofr.Context, req *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
- func (h *ChatServiceServerWrapper) ClientStream(stream ChatService_ClientStreamServer) error
- func (h ChatServiceServerWrapper) Resume(ctx *gofr.Context)
- func (h *ChatServiceServerWrapper) ServerStream(req *Request, stream ChatService_ServerStreamServer) error
- func (h ChatServiceServerWrapper) SetServingStatus(ctx *gofr.Context, service string, ...)
- func (h ChatServiceServerWrapper) Shutdown(ctx *gofr.Context)
- func (h ChatServiceServerWrapper) Watch(ctx *gofr.Context, in *healthpb.HealthCheckRequest, ...) error
- type ChatService_BiDiStreamClient
- type ChatService_BiDiStreamServer
- type ChatService_ClientStreamClient
- type ChatService_ClientStreamServer
- type ChatService_ServerStreamClient
- type ChatService_ServerStreamServer
- type Request
- type RequestWrapper
- type Response
- type UnimplementedChatServiceServer
- type UnsafeChatServiceServer
Constants ¶
This section is empty.
Variables ¶
var ChatService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ChatService", HandlerType: (*ChatServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "ServerStream", Handler: _ChatService_ServerStream_Handler, ServerStreams: true, }, { StreamName: "ClientStream", Handler: _ChatService_ClientStream_Handler, ClientStreams: true, }, { StreamName: "BiDiStream", Handler: _ChatService_BiDiStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "chat.proto", }
ChatService_ServiceDesc is the grpc.ServiceDesc for ChatService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_chat_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChatServiceServer ¶
func RegisterChatServiceServer(s grpc.ServiceRegistrar, srv ChatServiceServer)
func RegisterChatServiceServerWithGofr ¶
func RegisterChatServiceServerWithGofr(app *gofr.App, srv ChatServiceServerWithGofr)
RegisterChatServiceServerWithGofr registers the server
Types ¶
type ChatServiceClient ¶
type ChatServiceClient interface {
ServerStream(ctx context.Context, in *Request, opts ...grpc.CallOption) (ChatService_ServerStreamClient, error)
ClientStream(ctx context.Context, opts ...grpc.CallOption) (ChatService_ClientStreamClient, error)
BiDiStream(ctx context.Context, opts ...grpc.CallOption) (ChatService_BiDiStreamClient, error)
}
ChatServiceClient is the client API for ChatService 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 NewChatServiceClient ¶
func NewChatServiceClient(cc grpc.ClientConnInterface) ChatServiceClient
type ChatServiceGoFrServer ¶
type ChatServiceGoFrServer struct {
// contains filtered or unexported fields
}
func NewChatServiceGoFrServer ¶
func NewChatServiceGoFrServer() *ChatServiceGoFrServer
NewChatServiceGoFrServer creates a new instance of ChatServiceGoFrServer
func (*ChatServiceGoFrServer) BiDiStream ¶
func (s *ChatServiceGoFrServer) BiDiStream(ctx *gofr.Context, stream ChatService_BiDiStreamServer) error
func (*ChatServiceGoFrServer) ClientStream ¶
func (s *ChatServiceGoFrServer) ClientStream(ctx *gofr.Context, stream ChatService_ClientStreamServer) error
func (*ChatServiceGoFrServer) ServerStream ¶
func (s *ChatServiceGoFrServer) ServerStream(ctx *gofr.Context, stream ChatService_ServerStreamServer) error
type ChatServiceServer ¶
type ChatServiceServer interface {
ServerStream(*Request, ChatService_ServerStreamServer) error
ClientStream(ChatService_ClientStreamServer) error
BiDiStream(ChatService_BiDiStreamServer) error
// contains filtered or unexported methods
}
ChatServiceServer is the server API for ChatService service. All implementations must embed UnimplementedChatServiceServer for forward compatibility
type ChatServiceServerWithGofr ¶
type ChatServiceServerWithGofr interface {
ServerStream(*gofr.Context, ChatService_ServerStreamServer) error
ClientStream(*gofr.Context, ChatService_ClientStreamServer) error
BiDiStream(*gofr.Context, ChatService_BiDiStreamServer) error
}
ChatServiceServerWithGofr is the interface for the server implementation
type ChatServiceServerWrapper ¶
type ChatServiceServerWrapper struct {
ChatServiceServer
Container *container.Container
// contains filtered or unexported fields
}
ChatServiceServerWrapper wraps the server and handles request and response logic
func (*ChatServiceServerWrapper) BiDiStream ¶
func (h *ChatServiceServerWrapper) BiDiStream(stream ChatService_BiDiStreamServer) error
Bidirectional streaming handler for BiDiStream
func (ChatServiceServerWrapper) Check ¶
func (h ChatServiceServerWrapper) Check(ctx *gofr.Context, req *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
func (*ChatServiceServerWrapper) ClientStream ¶
func (h *ChatServiceServerWrapper) ClientStream(stream ChatService_ClientStreamServer) error
Client-side streaming handler for ClientStream
func (*ChatServiceServerWrapper) ServerStream ¶
func (h *ChatServiceServerWrapper) ServerStream(req *Request, stream ChatService_ServerStreamServer) error
Server-side streaming handler for ServerStream
func (ChatServiceServerWrapper) SetServingStatus ¶
func (h ChatServiceServerWrapper) SetServingStatus(ctx *gofr.Context, service string, servingStatus healthpb.HealthCheckResponse_ServingStatus)
func (ChatServiceServerWrapper) Watch ¶
func (h ChatServiceServerWrapper) Watch(ctx *gofr.Context, in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error
type ChatService_ServerStreamClient ¶
type ChatService_ServerStreamClient interface {
Recv() (*Response, error)
grpc.ClientStream
}
type ChatService_ServerStreamServer ¶
type ChatService_ServerStreamServer interface {
Send(*Response) error
grpc.ServerStream
}
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 RequestWrapper ¶
type RequestWrapper struct {
*Request
// contains filtered or unexported fields
}
Request Wrappers
func (*RequestWrapper) Bind ¶
func (h *RequestWrapper) Bind(p interface{}) error
func (*RequestWrapper) Context ¶
func (h *RequestWrapper) Context() context.Context
func (*RequestWrapper) HostName ¶
func (h *RequestWrapper) HostName() string
func (*RequestWrapper) Param ¶
func (h *RequestWrapper) Param(s string) string
func (*RequestWrapper) Params ¶
func (h *RequestWrapper) Params(s string) []string
func (*RequestWrapper) PathParam ¶
func (h *RequestWrapper) PathParam(s string) string
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 UnimplementedChatServiceServer ¶
type UnimplementedChatServiceServer struct {
}
UnimplementedChatServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedChatServiceServer) BiDiStream ¶
func (UnimplementedChatServiceServer) BiDiStream(ChatService_BiDiStreamServer) error
func (UnimplementedChatServiceServer) ClientStream ¶
func (UnimplementedChatServiceServer) ClientStream(ChatService_ClientStreamServer) error
func (UnimplementedChatServiceServer) ServerStream ¶
func (UnimplementedChatServiceServer) ServerStream(*Request, ChatService_ServerStreamServer) error
type UnsafeChatServiceServer ¶
type UnsafeChatServiceServer interface {
// contains filtered or unexported methods
}
UnsafeChatServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChatServiceServer will result in compilation errors.