networkloadbalancer

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("network load balancer not found")

ErrNotFound no load balancer has been found

Functions

func GenerateCreateInput

func GenerateCreateInput(cr *v1alpha1.NetworkLoadBalancer, listenerLanID, targetLanID int32, publicIPs []string) sdkgo.NetworkLoadBalancer

GenerateCreateInput returns sdkgo.NetworkLoadBalancer for Create requests based on CR spec

func GenerateUpdateInput

func GenerateUpdateInput(cr *v1alpha1.NetworkLoadBalancer, listenerLanID, targetLanID int32, publicIPs []string) sdkgo.NetworkLoadBalancerProperties

GenerateUpdateInput returns sdkgo.NetworkLoadBalancerProperties for Update requests based on CR spec

func IsUpToDate

func IsUpToDate(cr *v1alpha1.NetworkLoadBalancer, observed sdkgo.NetworkLoadBalancer, listenerLan, targetLan int32, ips []string) bool

IsUpToDate returns true if the NetworkLoadBalancer is up-to-date or false otherwise

func LateInitializer

LateInitializer fills the empty fields in *v1alpha1.NetworkLoadBalancerParameters with values that might have been provided by the API in sdkgo.NetworkLoadBalancer

func SetStatus

SetStatus sets fields of the NetworkLoadBalancerObservation based on sdkgo.NetworkLoadBalancer

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateNetworkLoadBalancer

func (cp *APIClient) CheckDuplicateNetworkLoadBalancer(ctx context.Context, datacenterID, nlbName string) (string, error)

CheckDuplicateNetworkLoadBalancer returns the ID of the duplicate Network Load Balancer if any, or an error if multiple Network Load Balancers with the same name are found

func (*APIClient) CreateNetworkLoadBalancer

func (cp *APIClient) CreateNetworkLoadBalancer(ctx context.Context, datacenterID string, nlb sdkgo.NetworkLoadBalancer) (sdkgo.NetworkLoadBalancer, error)

CreateNetworkLoadBalancer based on Datacenter ID and NetworkLoadBalancer

func (*APIClient) DeleteNetworkLoadBalancer

func (cp *APIClient) DeleteNetworkLoadBalancer(ctx context.Context, datacenterID, nlbID string) error

DeleteNetworkLoadBalancer based on Datacenter ID and NetworkLoadBalancer ID

func (*APIClient) GetNetworkLoadBalancerByID

func (cp *APIClient) GetNetworkLoadBalancerByID(ctx context.Context, datacenterID, nlbID string) (sdkgo.NetworkLoadBalancer, error)

GetNetworkLoadBalancerByID based on Datacenter ID and NetworkLoadBalancer ID

func (*APIClient) UpdateNetworkLoadBalancer

func (cp *APIClient) UpdateNetworkLoadBalancer(ctx context.Context, datacenterID, nlbID string, nlbProperties sdkgo.NetworkLoadBalancerProperties) (sdkgo.NetworkLoadBalancer, error)

UpdateNetworkLoadBalancer based on Datacenter ID, NetworkLoadBalancer ID and NetworkLoadBalancerProperties

type Client

type Client interface {
	CheckDuplicateNetworkLoadBalancer(ctx context.Context, datacenterID, nlbName string) (string, error)
	GetNetworkLoadBalancerByID(ctx context.Context, datacenterID, NetworkLoadBalancerID string) (sdkgo.NetworkLoadBalancer, error)
	CreateNetworkLoadBalancer(ctx context.Context, datacenterID string, nlb sdkgo.NetworkLoadBalancer) (sdkgo.NetworkLoadBalancer, error)
	UpdateNetworkLoadBalancer(ctx context.Context, datacenterID, nlbID string, nlbProperties sdkgo.NetworkLoadBalancerProperties) (sdkgo.NetworkLoadBalancer, error)
	DeleteNetworkLoadBalancer(ctx context.Context, datacenterID, nlbID string) error
}

Client is a wrapper around IONOS Service Network Load Balancer methods

Jump to

Keyboard shortcuts

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