Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager, ctx *shared.SharedContext) error
- func NewEnqueueRequestForEndpointEvent(client client.Client, eventRecorder record.EventRecorder) *enqueueRequestForEndpointEvent
- func NewEnqueueRequestForEndpointSliceEvent(client client.Client, record record.EventRecorder) *enqueueRequestForEndpointSliceEvent
- func NewEnqueueRequestForNodeEvent(client client.Client, record record.EventRecorder) *enqueueRequestForNodeEvent
- func NewEnqueueRequestForServiceEvent(eventRecorder record.EventRecorder) *enqueueRequestForServiceEvent
- type CreateAction
- type DeleteAction
- type IListenerManager
- type IModelBuilder
- type ListenerManager
- func (mgr *ListenerManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
- func (mgr *ListenerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
- func (mgr *ListenerManager) Create(reqCtx *svcCtx.RequestContext, action CreateAction) error
- func (mgr *ListenerManager) Delete(reqCtx *svcCtx.RequestContext, action DeleteAction) error
- func (mgr *ListenerManager) Describe(reqCtx *svcCtx.RequestContext, lbId string) ([]model.ListenerAttribute, error)
- func (mgr *ListenerManager) Update(reqCtx *svcCtx.RequestContext, action UpdateAction) error
- type LoadBalancerManager
- func (mgr *LoadBalancerManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) CleanupLoadBalancerTags(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) Create(reqCtx *svcCtx.RequestContext, local *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) Delete(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) Find(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) SetProtectionsOff(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
- func (mgr *LoadBalancerManager) Update(reqCtx *svcCtx.RequestContext, local, remote *model.LoadBalancer) error
- type ModelApplier
- type ModelBuilder
- type ModelType
- type ReconcileService
- type UpdateAction
- type VGroupManager
- func (mgr *VGroupManager) BatchAddVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, add interface{}) error
- func (mgr *VGroupManager) BatchRemoveVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, del interface{}) error
- func (mgr *VGroupManager) BatchUpdateVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, update interface{}) error
- func (mgr *VGroupManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, m *model.LoadBalancer) error
- func (mgr *VGroupManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, m *model.LoadBalancer) error
- func (mgr *VGroupManager) CreateVServerGroup(reqCtx *svcCtx.RequestContext, vg *model.VServerGroup, lbId string) error
- func (mgr *VGroupManager) DeleteVServerGroup(reqCtx *svcCtx.RequestContext, vGroupId string) error
- func (mgr *VGroupManager) DescribeVServerGroups(reqCtx *svcCtx.RequestContext, lbId string) ([]model.VServerGroup, error)
- func (mgr *VGroupManager) UpdateVServerGroup(reqCtx *svcCtx.RequestContext, local, remote model.VServerGroup) error
Constants ¶
View Source
const ( // LOCAL_MODEL, model built based on cluster information LocalModel = ModelType("local") // REMOTE_MODEL, Model built based on cloud information RemoteModel = ModelType("remote") )
View Source
const DefaultListenerBandwidth = -1
View Source
const DefaultServerWeight = 100
View Source
const MaxLBTagNum = 10
Variables ¶
This section is empty.
Functions ¶
func NewEnqueueRequestForEndpointEvent ¶
func NewEnqueueRequestForEndpointEvent(client client.Client, eventRecorder record.EventRecorder) *enqueueRequestForEndpointEvent
NewEnqueueRequestForEndpointEvent, event handler for endpoint events
func NewEnqueueRequestForEndpointSliceEvent ¶
func NewEnqueueRequestForEndpointSliceEvent(client client.Client, record record.EventRecorder) *enqueueRequestForEndpointSliceEvent
NewEnqueueRequestForEndpointSliceEvent, event handler for endpointslice event
func NewEnqueueRequestForNodeEvent ¶
func NewEnqueueRequestForNodeEvent(client client.Client, record record.EventRecorder) *enqueueRequestForNodeEvent
NewEnqueueRequestForNodeEvent, event handler for node event
func NewEnqueueRequestForServiceEvent ¶
func NewEnqueueRequestForServiceEvent(eventRecorder record.EventRecorder) *enqueueRequestForServiceEvent
Types ¶
type CreateAction ¶
type CreateAction struct {
// contains filtered or unexported fields
}
type DeleteAction ¶
type DeleteAction struct {
// contains filtered or unexported fields
}
type IListenerManager ¶
type IListenerManager interface { Create(reqCtx *svcCtx.RequestContext, action CreateAction) error Update(reqCtx *svcCtx.RequestContext, action UpdateAction) error }
IListener listener interface
type IModelBuilder ¶
type IModelBuilder interface {
Build(reqCtx *svcCtx.RequestContext) (*model.LoadBalancer, error)
}
type ListenerManager ¶
type ListenerManager struct {
// contains filtered or unexported fields
}
func NewListenerManager ¶
func NewListenerManager(cloud prvd.Provider) *ListenerManager
func (*ListenerManager) BuildLocalModel ¶
func (mgr *ListenerManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
func (*ListenerManager) BuildRemoteModel ¶
func (mgr *ListenerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
func (*ListenerManager) Create ¶
func (mgr *ListenerManager) Create(reqCtx *svcCtx.RequestContext, action CreateAction) error
func (*ListenerManager) Delete ¶
func (mgr *ListenerManager) Delete(reqCtx *svcCtx.RequestContext, action DeleteAction) error
func (*ListenerManager) Describe ¶
func (mgr *ListenerManager) Describe(reqCtx *svcCtx.RequestContext, lbId string) ([]model.ListenerAttribute, error)
Describe Describe all listeners at once
func (*ListenerManager) Update ¶
func (mgr *ListenerManager) Update(reqCtx *svcCtx.RequestContext, action UpdateAction) error
type LoadBalancerManager ¶
type LoadBalancerManager struct {
// contains filtered or unexported fields
}
func NewLoadBalancerManager ¶
func NewLoadBalancerManager(cloud prvd.Provider) *LoadBalancerManager
func (*LoadBalancerManager) BuildLocalModel ¶
func (mgr *LoadBalancerManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
Build build load balancer attribute for local model
func (*LoadBalancerManager) BuildRemoteModel ¶
func (mgr *LoadBalancerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
func (*LoadBalancerManager) CleanupLoadBalancerTags ¶
func (mgr *LoadBalancerManager) CleanupLoadBalancerTags(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
CleanupLoadBalancerTags removes service-related tags from remote slb
func (*LoadBalancerManager) Create ¶
func (mgr *LoadBalancerManager) Create(reqCtx *svcCtx.RequestContext, local *model.LoadBalancer) error
func (*LoadBalancerManager) Delete ¶
func (mgr *LoadBalancerManager) Delete(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
func (*LoadBalancerManager) Find ¶
func (mgr *LoadBalancerManager) Find(reqCtx *svcCtx.RequestContext, mdl *model.LoadBalancer) error
func (*LoadBalancerManager) SetProtectionsOff ¶
func (mgr *LoadBalancerManager) SetProtectionsOff(reqCtx *svcCtx.RequestContext, remote *model.LoadBalancer) error
SetProtectionsOff turns off modification protection and deletion protection of load balancer
func (*LoadBalancerManager) Update ¶
func (mgr *LoadBalancerManager) Update(reqCtx *svcCtx.RequestContext, local, remote *model.LoadBalancer) error
type ModelApplier ¶
type ModelApplier struct {
// contains filtered or unexported fields
}
func NewModelApplier ¶
func NewModelApplier(slbMgr *LoadBalancerManager, lisMgr *ListenerManager, vGroupMgr *VGroupManager) *ModelApplier
func (*ModelApplier) Apply ¶
func (m *ModelApplier) Apply(reqCtx *svcCtx.RequestContext, local *model.LoadBalancer) (*model.LoadBalancer, error)
type ModelBuilder ¶
type ModelBuilder struct { LoadBalancerMgr *LoadBalancerManager ListenerMgr *ListenerManager VGroupMgr *VGroupManager }
func NewModelBuilder ¶
func NewModelBuilder(slbMgr *LoadBalancerManager, lisMgr *ListenerManager, vGroupMgr *VGroupManager) *ModelBuilder
NewDefaultModelBuilder construct a new defaultModelBuilder
func (*ModelBuilder) BuildModel ¶
func (builder *ModelBuilder) BuildModel(reqCtx *svcCtx.RequestContext, modelType ModelType) (*model.LoadBalancer, error)
func (*ModelBuilder) Instance ¶
func (builder *ModelBuilder) Instance(modelType ModelType) IModelBuilder
type ReconcileService ¶
type ReconcileService struct {
// contains filtered or unexported fields
}
ReconcileService reconciles a AutoRepair object
type UpdateAction ¶
type UpdateAction struct {
// contains filtered or unexported fields
}
type VGroupManager ¶
type VGroupManager struct {
// contains filtered or unexported fields
}
func NewVGroupManager ¶
func NewVGroupManager(kubeClient client.Client, cloud prvd.Provider) *VGroupManager
func (*VGroupManager) BatchAddVServerGroupBackendServers ¶
func (mgr *VGroupManager) BatchAddVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, add interface{}) error
func (*VGroupManager) BatchRemoveVServerGroupBackendServers ¶
func (mgr *VGroupManager) BatchRemoveVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, del interface{}) error
func (*VGroupManager) BatchUpdateVServerGroupBackendServers ¶
func (mgr *VGroupManager) BatchUpdateVServerGroupBackendServers(reqCtx *svcCtx.RequestContext, vGroup model.VServerGroup, update interface{}) error
func (*VGroupManager) BuildLocalModel ¶
func (mgr *VGroupManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, m *model.LoadBalancer) error
func (*VGroupManager) BuildRemoteModel ¶
func (mgr *VGroupManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, m *model.LoadBalancer) error
func (*VGroupManager) CreateVServerGroup ¶
func (mgr *VGroupManager) CreateVServerGroup(reqCtx *svcCtx.RequestContext, vg *model.VServerGroup, lbId string) error
func (*VGroupManager) DeleteVServerGroup ¶
func (mgr *VGroupManager) DeleteVServerGroup(reqCtx *svcCtx.RequestContext, vGroupId string) error
func (*VGroupManager) DescribeVServerGroups ¶
func (mgr *VGroupManager) DescribeVServerGroups(reqCtx *svcCtx.RequestContext, lbId string) ([]model.VServerGroup, error)
func (*VGroupManager) UpdateVServerGroup ¶
func (mgr *VGroupManager) UpdateVServerGroup(reqCtx *svcCtx.RequestContext, local, remote model.VServerGroup) error
Click to show internal directories.
Click to hide internal directories.