server

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set(s *Servers)

Types

type Callbacks

type Callbacks = map[string]any

type Server

type Server struct {
	Name      string
	Type      byte
	Host      string
	Port      string
	Callbacks Callbacks
	TLS       *TLS //每个服务可以单独配置tls
	Server    *fasthttp.Server
}

type Servers

type Servers struct {
	Servers  []Server
	Settings *Settings
}

func Get

func Get() *Servers

type Settings

type Settings struct {
	HeartbeatCheckInterval int64 //心跳检测间隔
	HeartbeatIdleTime      int64 //心跳超时时间
	MessageType            int   //websocket消息类型
	AutoResponseGzipSize   int   //响应数据达到指定大小自动触发gzip压缩
	TLS                    *TLS  //tls配置
}

type TLS added in v0.8.8

type TLS struct {
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

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