server

package
v1.1.42 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSetServer is server providers.

Functions

func NewGRPCServer

func NewGRPCServer(bc *rabbitconf.Bootstrap) *grpc.Server

NewGRPCServer new a gRPC server.

func NewHTTPServer

func NewHTTPServer(bc *rabbitconf.Bootstrap) *http.Server

NewHTTPServer new an HTTP server.

Types

type HeartbeatServer added in v1.1.0

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

HeartbeatServer 心跳包服务

func (*HeartbeatServer) Start added in v1.1.0

func (h *HeartbeatServer) Start(ctx context.Context) error

Start 启动心跳包服务

func (*HeartbeatServer) Stop added in v1.1.0

func (h *HeartbeatServer) Stop(_ context.Context) error

Stop 停止心跳包服务

type Server

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

Server 服务

func RegisterService

func RegisterService(
	bc *rabbitconf.Bootstrap,
	data *data.Data,
	rpcSrv *grpc.Server,
	httpSrv *http.Server,
	configService *service.ConfigService,
	hookService *service.HookService,
	healthService *service.HealthService,
) *Server

RegisterService 注册服务

func (*Server) GetHTTPServer

func (s *Server) GetHTTPServer() *http.Server

GetHTTPServer 获取http server

func (*Server) GetRPCServer

func (s *Server) GetRPCServer() *grpc.Server

GetRPCServer 获取rpc server

func (*Server) GetServers

func (s *Server) GetServers() []transport.Server

GetServers 注册服务

Jump to

Keyboard shortcuts

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