server

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

@Title @Description @Author Wangwengang 2023/12/10 11:46 @Update Wangwengang 2023/12/10 11:46

@Title @Description @Author Wangwengang 2023/12/10 11:51 @Update Wangwengang 2023/12/10 11:51

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway struct {
	RpcMode bool
	RPC     srpc.SRPC
	// contains filtered or unexported fields
}

func NewGateway

func NewGateway(config *sconfig.Gateway, httpServer http.HttpServer, opts ...GatewayOptions) *Gateway

func (*Gateway) Start

func (g *Gateway) Start()

type GatewayOptions

type GatewayOptions func(g *Gateway)

func WithSRPC

func WithSRPC(srpc srpc.SRPC) GatewayOptions

type Server

type Server interface {
	Start()   // 启动服务,读取之前运行的数据
	Stop()    // 停止服务,保存数据
	Restart() // 重启服务

	AddHandler()
	AddHandlerSlices()

	// Add Http authentication method
	SetHttpAuth()
}

Jump to

Keyboard shortcuts

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