clbv1

package
v0.0.0-...-a1c3796 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

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 Add

func Add(mgr manager.Manager, ctx *shared.SharedContext) error

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 (*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

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 ModelType

type ModelType string

type ReconcileService

type ReconcileService struct {
	// contains filtered or unexported fields
}

ReconcileService reconciles a AutoRepair object

func (*ReconcileService) Reconcile

func (m *ReconcileService) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL