server

package
v1.47.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

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.

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 (*ChatServiceGoFrServer) ClientStream

func (*ChatServiceGoFrServer) ServerStream

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

Bidirectional streaming handler for BiDiStream

func (ChatServiceServerWrapper) Check

func (h ChatServiceServerWrapper) Check(ctx *gofr.Context, req *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)

func (*ChatServiceServerWrapper) ClientStream

Client-side streaming handler for ClientStream

func (ChatServiceServerWrapper) Resume

func (h ChatServiceServerWrapper) Resume(ctx *gofr.Context)

func (*ChatServiceServerWrapper) ServerStream

Server-side streaming handler for ServerStream

func (ChatServiceServerWrapper) SetServingStatus

func (h ChatServiceServerWrapper) SetServingStatus(ctx *gofr.Context, service string, servingStatus healthpb.HealthCheckResponse_ServingStatus)

func (ChatServiceServerWrapper) Shutdown

func (h ChatServiceServerWrapper) Shutdown(ctx *gofr.Context)

func (ChatServiceServerWrapper) Watch

func (h ChatServiceServerWrapper) Watch(ctx *gofr.Context, in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error

type ChatService_BiDiStreamClient

type ChatService_BiDiStreamClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type ChatService_BiDiStreamServer

type ChatService_BiDiStreamServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type ChatService_ClientStreamClient

type ChatService_ClientStreamClient interface {
	Send(*Request) error
	CloseAndRecv() (*Response, error)
	grpc.ClientStream
}

type ChatService_ClientStreamServer

type ChatService_ClientStreamServer interface {
	SendAndClose(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetMessage

func (x *Request) GetMessage() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedChatServiceServer

type UnimplementedChatServiceServer struct {
}

UnimplementedChatServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedChatServiceServer) BiDiStream

func (UnimplementedChatServiceServer) ClientStream

func (UnimplementedChatServiceServer) ServerStream

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL