Documentation
¶
Index ¶
Constants ¶
Variables ¶
View Source
var (
ErrDiscoveryDown = errors.New("discovery down")
)
Functions ¶
Types ¶
type IApp ¶
type IApp interface {
IAttributes
ID() string
Nodes() []INode
Reset(nodes Nodes)
NodeError(id string) error
Close() error
}
IApp app接口
func NewApp ¶
func NewApp(checker IHealthChecker, container IAppContainer, attrs Attrs, nodes Nodes) IApp
NewApp 创建服务发现app
type IDiscovery ¶
IDiscovery 服务发现接口
type IHealthChecker ¶
IHealthChecker 健康检查接口
type IHealthCheckerFactory ¶
type IHealthCheckerFactory interface {
IHealthChecker
Agent() (IHealthChecker, error)
Reset(conf interface{}) error
}
IHealthCheckerFactory 健康检查工厂类接口
type INodesData ¶
type INodesData interface {
Get(name string) (map[string]INode, bool)
Set(name string, nodes map[string]INode)
Del(name string) (map[string]INode, bool)
}
func NewNodesData ¶
func NewNodesData() INodesData
Click to show internal directories.
Click to hide internal directories.