serverlist

package
v5.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSyncServerIPList

func InitSyncServerIPList(appConfig func() config.AppConfig)

InitSyncServerIPList 初始化同步服务器信息列表 Deprecated 该方式启动的SyncServerIPListComponent无法关闭,强烈建议使用NewSyncServerIPListComponent

func SyncServerIPList

func SyncServerIPList(appConfigFunc func() config.AppConfig) (map[string]*config.ServerInfo, error)

SyncServerIPList sync ip list from server then 1.update agcache 2.store in disk

func SyncServerIPListSuccessCallBack

func SyncServerIPListSuccessCallBack(responseBody []byte, callback http.CallBack) (o interface{}, err error)

SyncServerIPListSuccessCallBack 同步服务器列表成功后的回调

Types

type SyncServerIPListComponent

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

SyncServerIPListComponent set timer for update ip list interval : 20m

func NewSyncServerIPListComponent

func NewSyncServerIPListComponent(appConfig func() config.AppConfig) *SyncServerIPListComponent

func (*SyncServerIPListComponent) Start

func (s *SyncServerIPListComponent) Start()

Start 启动同步服务器列表

func (*SyncServerIPListComponent) Stop

func (s *SyncServerIPListComponent) Stop()

Jump to

Keyboard shortcuts

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