Documentation ¶
Overview ¶
Package unilog .分布式日志注册中心. 全局对外可用两个接口: GoStart: 分布式日志注册中心 GetHostByCode: 根据服务(集群)名称和code码 获取对应ip.
节点ip对应code码生成规则: 优先默认取其节点ip最后一组数字,比如 comment集群 节点ip: 192.168.1.105 那么code码对应为105. 假如comment集群已经存在i节点ip 192.168.2.105(先注册code码为105),那么节点ip: 192.168.1.105则将重新计算,从1开始寻找ip码空位.
Index ¶
- Variables
- func GetAllAppHostMap() map[string][]string
- func GetAllAppHosts() []appHosts
- func GetHostByCode(appName string, code int64) string
- func GetHosts(appName string) []string
- func GoStart(r router.Router, rpcServerAddr string, path logging.BasePath, ...)
- type LogApp
- type LogInfoNameFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogInfoNameFunc = func(app string) (logInfo, logErr string) {
return app + ".log", app + "-err.log"
}
DefaultLogInfoNameFunc 默认的日志文件名称规则.
Functions ¶
func GetAllAppHostMap ¶
GetAllAppHostMap 获取所有app的所有ip, map[app]hosts
func GetHostByCode ¶
Types ¶
type LogInfoNameFunc ¶
Click to show internal directories.
Click to hide internal directories.