forwardingrule

package
v0.3.12-test Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("forwarding rule not found")

ErrNotFound no Network Load Balancer ForwardingRule rule has been found

Functions

func GenerateCreateInput

func GenerateCreateInput(cr *v1alpha1.ForwardingRule, listenerIP string, targetsIPs map[string]v1alpha1.ForwardingRuleTarget) sdkgo.NetworkLoadBalancerForwardingRule

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

func GenerateUpdateInput

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

func IsUpToDate

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

func SetStatus

SetStatus sets fields of the ForwardingRuleObservation based on sdkgo.NetworkLoadBalancerForwardingRule

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateForwardingRule

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

CheckDuplicateForwardingRule returns the ID of the duplicate Forwarding Rule if any, or an error if multiple Forwarding Rules with the same name are found

func (*APIClient) CreateForwardingRule

func (cp *APIClient) CreateForwardingRule(ctx context.Context, datacenterID, nlbID string, rule sdkgo.NetworkLoadBalancerForwardingRule) (sdkgo.NetworkLoadBalancerForwardingRule, error)

CreateForwardingRule based on Datacenter ID, NetworkLoadBalancer ID and ForwardingRule

func (*APIClient) DeleteForwardingRule

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

DeleteForwardingRule based on Datacenter ID, NetworkLoadBalancer ID and ForwardingRule ID

func (*APIClient) GetForwardingRuleByID

func (cp *APIClient) GetForwardingRuleByID(ctx context.Context, datacenterID, nlbID, ruleID string) (sdkgo.NetworkLoadBalancerForwardingRule, error)

GetForwardingRuleByID based on Datacenter ID, NetworkLoadBalancer ID and ForwardingRule ID

func (*APIClient) UpdateForwardingRule

func (cp *APIClient) UpdateForwardingRule(ctx context.Context, datacenterID, nlbID, ruleID string, ruleProperties sdkgo.NetworkLoadBalancerForwardingRuleProperties) (sdkgo.NetworkLoadBalancerForwardingRule, error)

UpdateForwardingRule based on Datacenter ID, NetworkLoadBalancer ID, ForwardingRule ID and ForwardingRule

type Client

type Client interface {
	CheckDuplicateForwardingRule(ctx context.Context, datacenterID, nlbID, ruleName string) (string, error)
	GetForwardingRuleByID(ctx context.Context, datacenterID, nlbID, ruleID string) (sdkgo.NetworkLoadBalancerForwardingRule, error)
	CreateForwardingRule(ctx context.Context, datacenterID, nlbID string, rule sdkgo.NetworkLoadBalancerForwardingRule) (sdkgo.NetworkLoadBalancerForwardingRule, error)
	UpdateForwardingRule(ctx context.Context, datacenterID, nlbID, ruleID string, ruleProperties sdkgo.NetworkLoadBalancerForwardingRuleProperties) (sdkgo.NetworkLoadBalancerForwardingRule, error)
	DeleteForwardingRule(ctx context.Context, datacenterID, nlbID, ruleID string) error
}

Client is a wrapper around IONOS Service Network Load Balancer ForwardingRule methods

Jump to

Keyboard shortcuts

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