storage

package
v1.7.4-release Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ToServerMap map[string]*ToServer

Functions

func DelToServerInfo

func DelToServerInfo(key string) bool

func GetToServerMap

func GetToServerMap() map[string]*ToServer

func Recovery

func Recovery(data *json.RawMessage)

func SaveToServerData

func SaveToServerData() interface{}

func SetToServerInfo

func SetToServerInfo(ToServerKey string, server ToServer)

func UpdateToServerInfo

func UpdateToServerInfo(ToServerKey string, server ToServer) error

Types

type ToServer

type ToServer struct {
	sync.Mutex
	PluginName    string
	PluginVersion string
	ConnUri       string
	Notes         string
	LastID        int   // 每个连接分配一个id,自增的,当前连接池被分配的最大id
	CurrentConn   int   // 当前连接总数
	MaxConn       int   // 连接池最大连接数
	MinConn       int   // 连接池保持最小连接数
	AvailableConn int   // 当前可用连接数
	UpdateTime    int64 // 配置最后修改的时间
}

func GetToServerInfo

func GetToServerInfo(key string) *ToServer

Jump to

Keyboard shortcuts

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