proxy

package
v0.0.0-...-a9119a5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentConfigMap = make(map[string]*ApiAgent)
View Source
var AgentDataMap = &SafeHostMap{M: make(map[string]map[string]int)}
View Source
var ApiAddrList []string

Functions

func InitProxy

func InitProxy(apiMap map[string]interface{})

func SyncHost

func SyncHost()

func SyncHostOnce

func SyncHostOnce()

Types

type ApiAgent

type ApiAgent struct {
	Cfg        ApiConfig
	RpcClients []*AgentG.SingleConnRpcClient
}

type ApiConfig

type ApiConfig struct {
	HbsRpcAddrs    []string `json:"hbs_rpc_addrs"`
	RpcCallTimeout int      `json:"rpc_call_timeout"`
	ApiAddr        string   `json:"api_addr"`
}

type SafeHostMap

type SafeHostMap struct {
	sync.RWMutex
	M map[string]map[string]int
}

func (*SafeHostMap) JudgeRegion

func (this *SafeHostMap) JudgeRegion(region, hostname string) bool

func (*SafeHostMap) ReInit

func (this *SafeHostMap) ReInit(m map[string]map[string]int)

Jump to

Keyboard shortcuts

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