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 IModelBuilder
- type ListenerManager
- func (mgr *ListenerManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *ListenerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *ListenerManager) CreateListener(reqCtx *svcCtx.RequestContext, lbId string, local *nlbmodel.ListenerAttribute) error
- func (mgr *ListenerManager) DeleteListener(reqCtx *svcCtx.RequestContext, lisId string) error
- func (mgr *ListenerManager) ListListeners(reqCtx *svcCtx.RequestContext, lbId string) ([]*nlbmodel.ListenerAttribute, error)
- func (mgr *ListenerManager) UpdateNLBListener(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.ListenerAttribute) error
- type ModelApplier
- type ModelBuilder
- type ModelType
- type NLBManager
- func (mgr *NLBManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) CleanupLoadBalancerTags(reqCtx *svcCtx.RequestContext, remote *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) Create(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) Delete(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) Find(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) SetProtectionsOff(reqCtx *svcCtx.RequestContext, remote *nlbmodel.NetworkLoadBalancer) error
- func (mgr *NLBManager) Update(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.NetworkLoadBalancer) error
- type ReconcileNLB
- type ServerGroupManager
- func (mgr *ServerGroupManager) BatchAddServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, ...) error
- func (mgr *ServerGroupManager) BatchRemoveServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, ...) error
- func (mgr *ServerGroupManager) BatchUpdateServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, ...) error
- func (mgr *ServerGroupManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *ServerGroupManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
- func (mgr *ServerGroupManager) CleanupServerGroupTags(reqCtx *svcCtx.RequestContext, r *nlbmodel.ServerGroup) error
- func (mgr *ServerGroupManager) CreateServerGroup(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup) error
- func (mgr *ServerGroupManager) DeleteServerGroup(reqCtx *svcCtx.RequestContext, sgId string) error
- func (mgr *ServerGroupManager) ListNLBServerGroups(reqCtx *svcCtx.RequestContext) ([]*nlbmodel.ServerGroup, error)
- func (mgr *ServerGroupManager) UpdateServerGroup(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.ServerGroup) 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 DefaultServerWeight = 100
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 IModelBuilder ¶
type IModelBuilder interface {
Build(reqCtx *svcCtx.RequestContext) (*nlbmodel.NetworkLoadBalancer, 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 *nlbmodel.NetworkLoadBalancer) error
func (*ListenerManager) BuildRemoteModel ¶
func (mgr *ListenerManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*ListenerManager) CreateListener ¶
func (mgr *ListenerManager) CreateListener(reqCtx *svcCtx.RequestContext, lbId string, local *nlbmodel.ListenerAttribute) error
func (*ListenerManager) DeleteListener ¶
func (mgr *ListenerManager) DeleteListener(reqCtx *svcCtx.RequestContext, lisId string) error
func (*ListenerManager) ListListeners ¶
func (mgr *ListenerManager) ListListeners(reqCtx *svcCtx.RequestContext, lbId string, ) ([]*nlbmodel.ListenerAttribute, error)
func (*ListenerManager) UpdateNLBListener ¶
func (mgr *ListenerManager) UpdateNLBListener(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.ListenerAttribute, ) error
type ModelApplier ¶
type ModelApplier struct {
// contains filtered or unexported fields
}
func NewModelApplier ¶
func NewModelApplier(nlbMgr *NLBManager, lisMgr *ListenerManager, sgMgr *ServerGroupManager) *ModelApplier
func (*ModelApplier) Apply ¶
func (m *ModelApplier) Apply(reqCtx *svcCtx.RequestContext, local *nlbmodel.NetworkLoadBalancer) (*nlbmodel.NetworkLoadBalancer, error)
type ModelBuilder ¶
type ModelBuilder struct { NLBMgr *NLBManager LisMgr *ListenerManager SGMgr *ServerGroupManager }
func NewModelBuilder ¶
func NewModelBuilder(nlbMgr *NLBManager, lisMgr *ListenerManager, sgMgr *ServerGroupManager) *ModelBuilder
NewDefaultModelBuilder construct a new defaultModelBuilder
func (*ModelBuilder) BuildModel ¶
func (builder *ModelBuilder) BuildModel(reqCtx *svcCtx.RequestContext, modelType ModelType) (*nlbmodel.NetworkLoadBalancer, error)
func (*ModelBuilder) Instance ¶
func (builder *ModelBuilder) Instance(modelType ModelType) IModelBuilder
type NLBManager ¶
type NLBManager struct {
// contains filtered or unexported fields
}
func NewNLBManager ¶
func NewNLBManager(cloud prvd.Provider) *NLBManager
func (*NLBManager) BuildLocalModel ¶
func (mgr *NLBManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) BuildRemoteModel ¶
func (mgr *NLBManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) CleanupLoadBalancerTags ¶
func (mgr *NLBManager) CleanupLoadBalancerTags(reqCtx *svcCtx.RequestContext, remote *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) Create ¶
func (mgr *NLBManager) Create(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) Delete ¶
func (mgr *NLBManager) Delete(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) Find ¶
func (mgr *NLBManager) Find(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) SetProtectionsOff ¶
func (mgr *NLBManager) SetProtectionsOff(reqCtx *svcCtx.RequestContext, remote *nlbmodel.NetworkLoadBalancer) error
func (*NLBManager) Update ¶
func (mgr *NLBManager) Update(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.NetworkLoadBalancer) error
type ReconcileNLB ¶
type ReconcileNLB struct {
// contains filtered or unexported fields
}
type ServerGroupManager ¶
type ServerGroupManager struct {
// contains filtered or unexported fields
}
func NewServerGroupManager ¶
func (*ServerGroupManager) BatchAddServers ¶
func (mgr *ServerGroupManager) BatchAddServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, add []nlbmodel.ServerGroupServer) error
func (*ServerGroupManager) BatchRemoveServers ¶
func (mgr *ServerGroupManager) BatchRemoveServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, del []nlbmodel.ServerGroupServer) error
func (*ServerGroupManager) BatchUpdateServers ¶
func (mgr *ServerGroupManager) BatchUpdateServers(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup, update []nlbmodel.ServerGroupServer) error
func (*ServerGroupManager) BuildLocalModel ¶
func (mgr *ServerGroupManager) BuildLocalModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*ServerGroupManager) BuildRemoteModel ¶
func (mgr *ServerGroupManager) BuildRemoteModel(reqCtx *svcCtx.RequestContext, mdl *nlbmodel.NetworkLoadBalancer) error
func (*ServerGroupManager) CleanupServerGroupTags ¶
func (mgr *ServerGroupManager) CleanupServerGroupTags(reqCtx *svcCtx.RequestContext, r *nlbmodel.ServerGroup) error
func (*ServerGroupManager) CreateServerGroup ¶
func (mgr *ServerGroupManager) CreateServerGroup(reqCtx *svcCtx.RequestContext, sg *nlbmodel.ServerGroup) error
func (*ServerGroupManager) DeleteServerGroup ¶
func (mgr *ServerGroupManager) DeleteServerGroup(reqCtx *svcCtx.RequestContext, sgId string) error
func (*ServerGroupManager) ListNLBServerGroups ¶
func (mgr *ServerGroupManager) ListNLBServerGroups(reqCtx *svcCtx.RequestContext) ([]*nlbmodel.ServerGroup, error)
func (*ServerGroupManager) UpdateServerGroup ¶
func (mgr *ServerGroupManager) UpdateServerGroup(reqCtx *svcCtx.RequestContext, local, remote *nlbmodel.ServerGroup) error
Click to show internal directories.
Click to hide internal directories.