Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegistPluginOptionCheck ¶
RegistPluginOptionCheck regist the options check
Types ¶
type LBPluginFactory ¶
type LBPluginFactory struct {
// contains filtered or unexported fields
}
LBPluginFactory plugin factory
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager lb plugin manager
func NewPluginManager ¶
NewPluginManager new lb plugin manager
func (*Manager) GetDefaultPlugin ¶
GetDefaultPlugin get default plugin
type Plugin ¶
type Plugin interface { AddPool(pools ...*object.PoolObject) error UpdatePool(pools ...*object.PoolObject) error DeletePool(pools ...*object.PoolObject) error GetPool(name string) *object.PoolObject UpdateNode(nodes ...*object.NodeObject) error DeleteNode(nodes ...*object.NodeObject) error AddNode(nodes ...*object.NodeObject) error GetNode(name string) *object.NodeObject UpdateRule(rules ...*object.RuleObject) error DeleteRule(rules ...*object.RuleObject) error AddRule(rules ...*object.RuleObject) error GetRule(name string) *object.RuleObject AddDomain(domains ...*object.DomainObject) error UpdateDomain(domains ...*object.DomainObject) error DeleteDomain(domains ...*object.DomainObject) error GetDomain(name string) *object.DomainObject GetName() string Stop() error AddVirtualService(services ...*object.VirtualServiceObject) error UpdateVirtualService(services ...*object.VirtualServiceObject) error DeleteVirtualService(services ...*object.VirtualServiceObject) error GetVirtualService(name string) *object.VirtualServiceObject //GetPluginStatus 获取插件状态,用于监控 GetPluginStatus() bool AddCertificate(cas ...*object.Certificate) error DeleteCertificate(cas ...*object.Certificate) error }
Plugin plugin interface 设计注意事项 1.需要先创建pool,再添加node 2.需要先创建pool,再添加vs 3.如果删除pool,不需要再删除node 4.操作pool或者node时需要使用pool分布式锁
Click to show internal directories.
Click to hide internal directories.