Documentation ¶
Index ¶
- Variables
- type Manager
- func (m *Manager) AddSource(o object.Object) (bool, error)
- func (m *Manager) CreateMutex(key string) *cluster.Mutex
- func (m *Manager) DeleteSource(o object.Object) (bool, error)
- func (m *Manager) GetAllNodes() ([]*object.NodeObject, error)
- func (m *Manager) GetAllPools() ([]*object.PoolObject, error)
- func (m *Manager) GetAllRule(protocol string) ([]*object.RuleObject, error)
- func (m *Manager) GetAllVSs() ([]*object.VirtualServiceObject, error)
- func (m *Manager) GetCertificate(certName string) (*object.Certificate, error)
- func (m *Manager) GetNodeByPool(poolName string) ([]*object.NodeObject, error)
- func (m *Manager) GetPools(poolNames map[string]string) ([]*object.PoolObject, error)
- func (m *Manager) GetRule(rule *object.RuleObject) (*object.RuleObject, error)
- func (m *Manager) GetRuleByPool(protocol string, poolName string) ([]*object.RuleObject, error)
- func (m *Manager) GetSource(o object.Object) (object.Object, error)
- func (m *Manager) GetVSByPoolName(poolName string) (*object.VirtualServiceObject, error)
- func (m *Manager) UpdateSource(o object.Object) (bool, bool, error)
- func (m *Manager) UpdateSourceOnline(o object.Object, IsOnline bool) error
- type ReadStore
- type SourceInfo
Constants ¶
This section is empty.
Variables ¶
var ErrTypeUnknown = errors.New("object type unknown")
ErrTypeUnknown unknown source type error
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager store manager
func NewManager ¶
NewManager create a manager
func (*Manager) AddSource ¶
AddSource save source if result=false and err==nil this entrance do not call plugin if result=true and err==nil this entrance need call plugin if result=false and err!=nil need retry or return err
func (*Manager) CreateMutex ¶
CreateMutex Create a distributed lock
func (*Manager) DeleteSource ¶
DeleteSource delete source if result=false and err==nil this entrance do not call plugin
func (*Manager) GetAllNodes ¶
func (m *Manager) GetAllNodes() ([]*object.NodeObject, error)
GetAllNodes get all node data
func (*Manager) GetAllPools ¶
func (m *Manager) GetAllPools() ([]*object.PoolObject, error)
GetAllPools 获取全部pools
func (*Manager) GetAllRule ¶
func (m *Manager) GetAllRule(protocol string) ([]*object.RuleObject, error)
GetAllRule get all rules objects by protocol protocol could be http or https
func (*Manager) GetAllVSs ¶
func (m *Manager) GetAllVSs() ([]*object.VirtualServiceObject, error)
GetAllVSs get all vs data
func (*Manager) GetCertificate ¶
func (m *Manager) GetCertificate(certName string) (*object.Certificate, error)
Get cert key pair
func (*Manager) GetNodeByPool ¶
func (m *Manager) GetNodeByPool(poolName string) ([]*object.NodeObject, error)
GetNodeByPool get all nodes objects by poolName
func (*Manager) GetRule ¶
func (m *Manager) GetRule(rule *object.RuleObject) (*object.RuleObject, error)
GetRule get rule by *object.RuleObject
func (*Manager) GetRuleByPool ¶
GetRuleByPool get all rules objects by pool name
func (*Manager) GetVSByPoolName ¶
func (m *Manager) GetVSByPoolName(poolName string) (*object.VirtualServiceObject, error)
GetVSByPoolName get vs by pool name
func (*Manager) UpdateSource ¶
UpdateSource update source if result=false and err==nil this entrance do not call plugin if result=true and err==nil this entrance need call plugin if result=false and err!=nil need retry or return err return:isOnline/isCouldCallPlugin/error
type ReadStore ¶
type ReadStore interface { //根据协议查询所有rule GetAllRule(protocol string) ([]*object.RuleObject, error) GetNodeByPool(poolName string) ([]*object.NodeObject, error) GetPools(poolNames map[string]string) ([]*object.PoolObject, error) GetRule(rule *object.RuleObject) (*object.RuleObject, error) GetRuleByPool(protocol string, poolName string) ([]*object.RuleObject, error) GetVSByPoolName(poolName string) (*object.VirtualServiceObject, error) GetCertificate(certName string) (*object.Certificate, error) }
ReadStore 只读存储接口