setting

package
v0.0.0-...-d989b54 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Component = "gokeeper"
)

Variables

View Source
var (
	KeeperID        int64  //keeper id
	KeeperRpcAddr   string //keeper server address for node (gorpc listen)
	KeeperAdminAddr string //keeper server address for node (admin listen)
)
View Source
var (
	ConfigFile string

	GoRpcListen string // gorpc listen(采用内部gorpc协议)
	GRpcListen  string // grpc listen(采用google grpc协议)
	AdminListen string // admin listen
	PromListen  string // prometheus metrics listen

	//配置存储
	StorageUrl      []string
	StorageUsername string
	StoragePassword string
	EventMode       operate.EventModeType //etcd 监听的事件方式 conf:监听domain conf  version:监听domain version,默认为version

	//服务发现后端存储
	RegistryUrl      []string
	RegistryUsername string
	RegistryPassword string

	BasePath string
	LogPath  = "log"
	TmpPath  = "tmp"

	EventInterval = 60
	TestMode      = false

	GrpcListener net.Listener //grpc中配置和服务发现的端口暂时共用
)

Functions

func GetAgentNodeID

func GetAgentNodeID(nodeID string) string

agent 不需要端口,取ip作为agent nodeid 初衷:想通过各个服务的节点 nodeID,直接获取agent的node信息, 而仅通过服务的nodeID是无法得知agent的端口号的,所以干脆就直接使用ip作为索引

func GetDecodedKeeperAddr

func GetDecodedKeeperAddr(rawAddrs string) (admin, rpc string)

func GetEncodedKeeperAddr

func GetEncodedKeeperAddr() string

func InitConfig

func InitConfig() error

func InitKeeperAddr

func InitKeeperAddr(rpcListen, adminListen string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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