controller

package
v0.0.0-...-a761922 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHealthService

func RegisterHealthService(server *grpc.Server, healthService *HealthService)

RegisterHealthService 将健康检查服务注册到 gRPC 服务

func RegisterWithConsul

func RegisterWithConsul() error

Types

type Chatserver

type Chatserver struct {
	pb.UnimplementedChatServiceServer
	// contains filtered or unexported fields
}

func NewChatServer

func NewChatServer() *Chatserver

NewChatServer 创建并返回一个新的 Chatserver 实例

func (*Chatserver) ReceiveMessageStream

func (s *Chatserver) ReceiveMessageStream(req *pb.MessageStreamRequest, stream pb.ChatService_ReceiveMessageStreamServer) error

func (*Chatserver) SendMessage

func (*Chatserver) StartTimer

func (s *Chatserver) StartTimer(ctx context.Context)

type HealthService

type HealthService struct {
	// contains filtered or unexported fields
}

HealthService 实现 grpc_health_v1.HealthServer 接口

func NewHealthService

func NewHealthService() *HealthService

NewHealthService 创建新的 HealthService 实例

func (*HealthService) Check

Check 方法实现

func (*HealthService) SetStatus

SetStatus 设置服务健康状态

func (*HealthService) Watch

Watch 方法实现(非必须,可返回未实现错误)

Jump to

Keyboard shortcuts

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