loadbalancer

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoadBalancerName

func GetLoadBalancerName(ing *v1.Ingress) string

GetLoadBalancerName compose a load balancer name from ingress object

func IsActiveStatus added in v1.0.2

func IsActiveStatus(status string) bool

IsActiveStatus determines if lb has an active status

Types

type LBManagerInterface

type LBManagerInterface interface {
	HasRegistration(name string) bool
	NewLoadBalancer(input *serverscom.L7LoadBalancerCreateInput) (*serverscom.L7LoadBalancer, error, bool)
	DeleteLoadBalancer(name string) error
	UpdateLoadBalancer(input *serverscom.L7LoadBalancerUpdateInput) (*serverscom.L7LoadBalancer, error, bool)
	GetIds() []string
	TranslateIngressToLB(ingress *networkv1.Ingress, sslCerts map[string]string) (*serverscom.L7LoadBalancerCreateInput, error)
	GetLoadBalancer(name string) (*serverscom.L7LoadBalancer, error)
}

ManagerInterface describes an interface to manage load balancers

type LoadBalancer

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

LoadBalancer represents a load balancer object for manager

func NewLoadBalancer

NewLoadBalancer creates a new load balancer object

func (*LoadBalancer) Copy

func (lb *LoadBalancer) Copy() *LoadBalancer

Copy makes a copy of load balancer

func (*LoadBalancer) Find

func (lb *LoadBalancer) Find(name string) bool

Find finds load balancer in portal and sets lb id if found

func (*LoadBalancer) Get added in v1.0.2

Get gets load balancer from api

func (*LoadBalancer) IsChanged

func (lb *LoadBalancer) IsChanged(newInput *serverscom.L7LoadBalancerUpdateInput) bool

IsChanged returns true if newInput don't match currentInput

func (*LoadBalancer) MarkAsDeleted

func (lb *LoadBalancer) MarkAsDeleted()

MarkAsDeleted marks load balancer as deleted

func (*LoadBalancer) Sync

Sync create/update/delete load balancer depending on it state

func (*LoadBalancer) UpdateInput

func (lb *LoadBalancer) UpdateInput(newInput *serverscom.L7LoadBalancerUpdateInput)

UpdateInput saves current input to previous and updates current input with newInput

type Manager

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

Manager represents a load balancer manager

func NewManager

func NewManager(client *serverscom.Client, store store.Storer) *Manager

NewManager creates a load balancer manager

func (*Manager) DeleteLoadBalancer

func (m *Manager) DeleteLoadBalancer(name string) error

DeleteLoadBalancer deletes load balancer from portal and manager

func (*Manager) GetIds

func (m *Manager) GetIds() []string

func (*Manager) GetLoadBalancer added in v1.0.2

func (m *Manager) GetLoadBalancer(name string) (*serverscom.L7LoadBalancer, error)

GetLoadBalancer get load balancer from api

func (*Manager) HasRegistration

func (m *Manager) HasRegistration(name string) bool

HasRegistration checks if lb manager has load balancer with specified name

func (*Manager) NewLoadBalancer

NewLoadBalancer creates a new load balancer in portal from input if it doesn't exists in portal, otherwise update it Updates load balancer state in manager

func (*Manager) TranslateIngressToLB

func (m *Manager) TranslateIngressToLB(ingress *networkv1.Ingress, sslCerts map[string]string) (*serverscom.L7LoadBalancerCreateInput, error)

TranslateIngressToLB maps an Ingress to L7 LB object and fills annotations

func (*Manager) UpdateLoadBalancer

func (m *Manager) UpdateLoadBalancer(input *serverscom.L7LoadBalancerUpdateInput) (*serverscom.L7LoadBalancer, error, bool)

UpdateLoadBalancer updates load balancer in portal and manager.

Jump to

Keyboard shortcuts

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