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 IServices ¶
type IServices interface {
Set(serviceName string, id string, app IApp) error
Remove(id string) (string, int)
Update(serviceName string, nodes Nodes) error
AppKeys() []string
}
IServices 服务app集合接口
type NodesData ¶
type NodesData struct {
// contains filtered or unexported fields
}
func NewNodesData ¶
func NewNodesData() *NodesData
Click to show internal directories.
Click to hide internal directories.