Documentation ¶
Index ¶
- Variables
- func GetModels(opts *GetModelsOptions) error
- func InitializeModelSetFromJSON(set IModelSet, entriesJson []jsonutils.JSONObject) error
- func ModelSetMaxUpdatedAt(set IModelSet) time.Time
- func ModelSetsMaxUpdatedAtSetField(mssmua *ModelSetsMaxUpdatedAt, keyPlural string, t time.Time)
- type AgentParams
- type GenGobetweenConfigOptions
- type GenHaproxyConfigsResult
- type GenKeepalivedConfigOptions
- type GetModelsOptions
- type IModel
- type IModelSet
- type Loadbalancer
- type LoadbalancerAcl
- type LoadbalancerAcls
- type LoadbalancerBackend
- type LoadbalancerBackendGroup
- type LoadbalancerBackendGroups
- type LoadbalancerBackends
- type LoadbalancerCertificate
- type LoadbalancerCertificates
- type LoadbalancerCorpus
- func (b *LoadbalancerCorpus) GenGobetweenConfigs(dir string, opts *GenGobetweenConfigOptions) error
- func (b *LoadbalancerCorpus) GenHaproxyConfigs(dir string, opts *AgentParams) (*GenHaproxyConfigsResult, error)
- func (b *LoadbalancerCorpus) GenHaproxyToplevelConfig(dir string, opts *AgentParams) error
- func (b *LoadbalancerCorpus) GenKeepalivedConfigs(dir string, opts *GenKeepalivedConfigOptions) error
- func (b *LoadbalancerCorpus) LoadDir(dir string) error
- func (b *LoadbalancerCorpus) MaxSeenUpdatedAtParams() *jsonutils.JSONDict
- func (b *LoadbalancerCorpus) SaveDir(dir string) error
- func (b *LoadbalancerCorpus) SyncModelSets(s *mcclient.ClientSession, batchSize int) (*ModelSetsUpdateResult, error)
- type LoadbalancerListener
- type LoadbalancerListenerRule
- type LoadbalancerListenerRules
- type LoadbalancerListeners
- func (ms LoadbalancerListeners) JoinCertificates(subEntries LoadbalancerCertificates) bool
- func (ms LoadbalancerListeners) JoinListenerRules(subEntries LoadbalancerListenerRules) bool
- func (set LoadbalancerListeners) ModelManager() modules.Manager
- func (set LoadbalancerListeners) NewModel() models.IVirtualResource
- type Loadbalancers
- type ModelSetUpdateResult
- type ModelSets
- type ModelSetsMaxUpdatedAt
- type ModelSetsUpdateResult
Constants ¶
This section is empty.
Variables ¶
View Source
var PseudoZeroTime = time.Time{}.Add(time.Nanosecond)
A hack to workaround the IsZero() in timeutils.Utcify. This depends on the fact that database time has a resolution of 1-second
Functions ¶
func GetModels ¶
func GetModels(opts *GetModelsOptions) error
func InitializeModelSetFromJSON ¶
func InitializeModelSetFromJSON(set IModelSet, entriesJson []jsonutils.JSONObject) error
func ModelSetMaxUpdatedAt ¶
func ModelSetsMaxUpdatedAtSetField ¶
func ModelSetsMaxUpdatedAtSetField(mssmua *ModelSetsMaxUpdatedAt, keyPlural string, t time.Time)
Types ¶
type AgentParams ¶
type AgentParams struct { AgentModel *models.LoadbalancerAgent KeepalivedConfigTmpl *template.Template HaproxyConfigTmpl *template.Template Data map[string]interface{} }
func NewAgentParams ¶
func NewAgentParams(agent *models.LoadbalancerAgent) (*AgentParams, error)
func (*AgentParams) Equal ¶
func (p *AgentParams) Equal(p2 *AgentParams) bool
func (*AgentParams) KeepalivedConfig ¶
func (p *AgentParams) KeepalivedConfig()
func (*AgentParams) SetHaproxyParams ¶
func (p *AgentParams) SetHaproxyParams(k string, v interface{}) map[string]interface{}
func (*AgentParams) SetVrrpParams ¶
func (p *AgentParams) SetVrrpParams(k string, v interface{}) map[string]interface{}
type GenGobetweenConfigOptions ¶
type GenGobetweenConfigOptions struct { LoadbalancersEnabled []*Loadbalancer AgentParams *AgentParams Config *gobetween.Config }
type GenHaproxyConfigsResult ¶
type GenHaproxyConfigsResult struct {
LoadbalancersEnabled []*Loadbalancer
}
type GenKeepalivedConfigOptions ¶
type GenKeepalivedConfigOptions struct { LoadbalancersEnabled []*Loadbalancer AgentParams *AgentParams }
type GetModelsOptions ¶
type IModelSet ¶
type IModelSet interface { //InitializeFromJSON([]jsonutils.JSONObject) error ModelManager() modules.Manager NewModel() models.IVirtualResource // contains filtered or unexported methods }
type Loadbalancer ¶
type Loadbalancer struct { *models.Loadbalancer // contains filtered or unexported fields }
type LoadbalancerAcl ¶
type LoadbalancerAcl struct {
*models.LoadbalancerAcl
}
type LoadbalancerAcls ¶
type LoadbalancerAcls map[string]*LoadbalancerAcl
func (LoadbalancerAcls) ModelManager ¶
func (set LoadbalancerAcls) ModelManager() modules.Manager
func (LoadbalancerAcls) NewModel ¶
func (set LoadbalancerAcls) NewModel() models.IVirtualResource
type LoadbalancerBackend ¶
type LoadbalancerBackend struct {
*models.LoadbalancerBackend
}
type LoadbalancerBackendGroup ¶
type LoadbalancerBackendGroup struct { *models.LoadbalancerBackendGroup // contains filtered or unexported fields }
type LoadbalancerBackendGroups ¶
type LoadbalancerBackendGroups map[string]*LoadbalancerBackendGroup
func (LoadbalancerBackendGroups) JoinBackends ¶
func (ms LoadbalancerBackendGroups) JoinBackends(subEntries LoadbalancerBackends) bool
func (LoadbalancerBackendGroups) ModelManager ¶
func (set LoadbalancerBackendGroups) ModelManager() modules.Manager
func (LoadbalancerBackendGroups) NewModel ¶
func (set LoadbalancerBackendGroups) NewModel() models.IVirtualResource
type LoadbalancerBackends ¶
type LoadbalancerBackends map[string]*LoadbalancerBackend
func (LoadbalancerBackends) ModelManager ¶
func (set LoadbalancerBackends) ModelManager() modules.Manager
func (LoadbalancerBackends) NewModel ¶
func (set LoadbalancerBackends) NewModel() models.IVirtualResource
type LoadbalancerCertificate ¶
type LoadbalancerCertificate struct {
*models.LoadbalancerCertificate
}
type LoadbalancerCertificates ¶
type LoadbalancerCertificates map[string]*LoadbalancerCertificate
func (LoadbalancerCertificates) ModelManager ¶
func (set LoadbalancerCertificates) ModelManager() modules.Manager
func (LoadbalancerCertificates) NewModel ¶
func (set LoadbalancerCertificates) NewModel() models.IVirtualResource
type LoadbalancerCorpus ¶
type LoadbalancerCorpus struct { *ModelSets ModelSetsMaxUpdatedAt *ModelSetsMaxUpdatedAt }
func NewEmptyLoadbalancerCorpus ¶
func NewEmptyLoadbalancerCorpus() *LoadbalancerCorpus
func (*LoadbalancerCorpus) GenGobetweenConfigs ¶
func (b *LoadbalancerCorpus) GenGobetweenConfigs(dir string, opts *GenGobetweenConfigOptions) error
func (*LoadbalancerCorpus) GenHaproxyConfigs ¶
func (b *LoadbalancerCorpus) GenHaproxyConfigs(dir string, opts *AgentParams) (*GenHaproxyConfigsResult, error)
func (*LoadbalancerCorpus) GenHaproxyToplevelConfig ¶
func (b *LoadbalancerCorpus) GenHaproxyToplevelConfig(dir string, opts *AgentParams) error
func (*LoadbalancerCorpus) GenKeepalivedConfigs ¶
func (b *LoadbalancerCorpus) GenKeepalivedConfigs(dir string, opts *GenKeepalivedConfigOptions) error
func (*LoadbalancerCorpus) LoadDir ¶
func (b *LoadbalancerCorpus) LoadDir(dir string) error
func (*LoadbalancerCorpus) MaxSeenUpdatedAtParams ¶
func (b *LoadbalancerCorpus) MaxSeenUpdatedAtParams() *jsonutils.JSONDict
func (*LoadbalancerCorpus) SaveDir ¶
func (b *LoadbalancerCorpus) SaveDir(dir string) error
func (*LoadbalancerCorpus) SyncModelSets ¶
func (b *LoadbalancerCorpus) SyncModelSets(s *mcclient.ClientSession, batchSize int) (*ModelSetsUpdateResult, error)
type LoadbalancerListener ¶
type LoadbalancerListener struct { *models.LoadbalancerListener // contains filtered or unexported fields }
type LoadbalancerListenerRule ¶
type LoadbalancerListenerRule struct { *models.LoadbalancerListenerRule // contains filtered or unexported fields }
type LoadbalancerListenerRules ¶
type LoadbalancerListenerRules map[string]*LoadbalancerListenerRule
func (LoadbalancerListenerRules) ModelManager ¶
func (set LoadbalancerListenerRules) ModelManager() modules.Manager
func (LoadbalancerListenerRules) NewModel ¶
func (set LoadbalancerListenerRules) NewModel() models.IVirtualResource
type LoadbalancerListeners ¶
type LoadbalancerListeners map[string]*LoadbalancerListener
func (LoadbalancerListeners) JoinCertificates ¶
func (ms LoadbalancerListeners) JoinCertificates(subEntries LoadbalancerCertificates) bool
func (LoadbalancerListeners) JoinListenerRules ¶
func (ms LoadbalancerListeners) JoinListenerRules(subEntries LoadbalancerListenerRules) bool
func (LoadbalancerListeners) ModelManager ¶
func (set LoadbalancerListeners) ModelManager() modules.Manager
func (LoadbalancerListeners) NewModel ¶
func (set LoadbalancerListeners) NewModel() models.IVirtualResource
type Loadbalancers ¶
type Loadbalancers map[string]*Loadbalancer
func (Loadbalancers) JoinBackendGroups ¶
func (ms Loadbalancers) JoinBackendGroups(subEntries LoadbalancerBackendGroups) bool
func (Loadbalancers) JoinListeners ¶
func (ms Loadbalancers) JoinListeners(subEntries LoadbalancerListeners) bool
func (Loadbalancers) ModelManager ¶
func (set Loadbalancers) ModelManager() modules.Manager
func (Loadbalancers) NewModel ¶
func (set Loadbalancers) NewModel() models.IVirtualResource
type ModelSetUpdateResult ¶
func ModelSetApplyUpdates ¶
func ModelSetApplyUpdates(aSet, bSet IModelSet) *ModelSetUpdateResult
ModelSetApplyUpdates applies bSet to aSet.
- PendingDeleted in bSet are removed from aSet
- Newer models in bSet are updated in aSet
type ModelSets ¶
type ModelSets struct { Loadbalancers Loadbalancers LoadbalancerListeners LoadbalancerListeners LoadbalancerListenerRules LoadbalancerListenerRules LoadbalancerBackendGroups LoadbalancerBackendGroups LoadbalancerBackends LoadbalancerBackends LoadbalancerAcls LoadbalancerAcls LoadbalancerCertificates LoadbalancerCertificates }
func NewModelSets ¶
func NewModelSets() *ModelSets
func (*ModelSets) ApplyUpdates ¶
func (mss *ModelSets) ApplyUpdates(mssNews *ModelSets) *ModelSetsUpdateResult
func (*ModelSets) MaxSeenUpdatedAtParams ¶
func (*ModelSets) ModelSetList ¶
type ModelSetsMaxUpdatedAt ¶
type ModelSetsMaxUpdatedAt struct { Loadbalancers time.Time LoadbalancerListeners time.Time LoadbalancerListenerRules time.Time LoadbalancerBackendGroups time.Time LoadbalancerBackends time.Time LoadbalancerAcls time.Time LoadbalancerCertificates time.Time }
func NewModelSetsMaxUpdatedAt ¶
func NewModelSetsMaxUpdatedAt() *ModelSetsMaxUpdatedAt
type ModelSetsUpdateResult ¶
type ModelSetsUpdateResult struct { Correct bool // all elements referenced are present Changed bool // any thing changed in the corpus ModelSetsMaxUpdatedAt *ModelSetsMaxUpdatedAt }
Click to show internal directories.
Click to hide internal directories.