azure

package
v0.0.0-...-f99fb5f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector(ctx context.Context, logger *logrus.Entry, config string) (provider.Provider, error)

Types

type AzureConnector

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

func (*AzureConnector) AddBGPAddressesToVnetGateway

func (c *AzureConnector) AddBGPAddressesToVnetGateway(
	ctx context.Context,
	cidrPools []*cidrpool.CIDRV4Pool,
	gatewayName string,
	numberOfTunnels uint8,
) error

func (*AzureConnector) AttachToExternalGatewayWithBGP

func (c *AzureConnector) AttachToExternalGatewayWithBGP(
	ctx context.Context,
	gateway types.Gateway,
	peerGateway types.Gateway,
	attachMode types.AttachBGPConnectionMode,
	config types.CreateBGPConnectionConfig,
) (types.OutputForConnectionWithBGP, error)

func (*AzureConnector) AttachToExternalGatewayWithStaticRouting

func (c *AzureConnector) AttachToExternalGatewayWithStaticRouting() error

NOT IMPLEMENTED

Just a placeholder for future CSP improvements.

func (*AzureConnector) Close

func (c *AzureConnector) Close() error

func (*AzureConnector) DeleteConnectionResources

func (c *AzureConnector) DeleteConnectionResources(
	ctx context.Context,
	gateway types.Gateway,
	peerGateway types.Gateway,
) error

func (*AzureConnector) GenerateName

func (c *AzureConnector) GenerateName(id string) string

GenerateName generates a name for the resource in a specific manner, which allows to connect that particular resource with the connection it was created for.

Generate method adds a prefix with encoded string taken from names of both gateways that take place in the connection.

TODO: Design a way to handle possible name collisions with hashing algorithm being used here.

func (*AzureConnector) GetCIDRs

func (c *AzureConnector) GetCIDRs(ctx context.Context, gateway types.Gateway) ([]string, error)

func (*AzureConnector) GetGateway

func (c *AzureConnector) GetGateway(ctx context.Context, gateway types.GatewayIdentifier) (*types.Gateway, error)

func (*AzureConnector) GetGatewayConnectionSettings

func (c *AzureConnector) GetGatewayConnectionSettings(
	ctx context.Context, gateway types.Gateway,
) (types.GatewayConnectionSettings, error)

func (*AzureConnector) GetVPCForGateway

func (c *AzureConnector) GetVPCForGateway(ctx context.Context, gateway types.Gateway) (string, error)

func (*AzureConnector) InitializeASN

func (c *AzureConnector) InitializeASN(
	ctx context.Context, gateway types.Gateway, peerGateway types.Gateway,
) (uint64, error)

func (*AzureConnector) InitializeCreation

func (c *AzureConnector) InitializeCreation(
	ctx context.Context, gateway types.Gateway, peerGateway types.Gateway,
) error

func (*AzureConnector) InitializeGatewayInterfaces

func (c *AzureConnector) InitializeGatewayInterfaces(
	ctx context.Context, gateway types.Gateway, peerGateway types.Gateway,
) ([]string, error)

func (*AzureConnector) IsNameOwnedByConnection

func (c *AzureConnector) IsNameOwnedByConnection(name string) bool

Returns true if the name, provided as an argument, indicates that the resource was created while creating a connection between GCP Cloud Router and AWS Transit Gateway from the configuration.

func (*AzureConnector) ListGateways

func (c *AzureConnector) ListGateways(ctx context.Context) ([]types.Gateway, error)

func (*AzureConnector) Name

func (c *AzureConnector) Name() string

type Config

type Config struct {
	// The name of the Location, where the resources will be spawned or
	// modified.
	Location string `yaml:"location"`
	// The Resource Group acting as a container for Azure resources.
	ResourceGroup string `yaml:"resourceGroup"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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