azure

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReadRequestsCounter is a global counter for Azure read requests.
	ReadRequestsCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "azure_read_requests_total",
			Help: "Number of Azure read requests",
		},
	)
	// WriteRequestsCounter is a global counter for Azure write requests.
	WriteRequestsCounter = prometheus.NewCounter(
		prometheus.CounterOpts{
			Name: "azure_write_requests_total",
			Help: "Number of Azure write requests",
		},
	)
)

Functions

This section is empty.

Types

type PublicIPAddressUtils

type PublicIPAddressUtils interface {
	// GetByName returns the PublicIPAddress with the given name, or nil if not found.
	GetByName(ctx context.Context, name string) (*network.PublicIPAddress, error)
	// GetByIP returns the PublicIPAddress with the given IP, or nil if not found.
	GetByIP(ctx context.Context, ip string) (*network.PublicIPAddress, error)
	// GetAll returns all PublicIPAddresses.
	GetAll(ctx context.Context) ([]network.PublicIPAddress, error)
	// RemoveFromLoadBalancer removes all FrontendIPConfigurations, LoadBalancingRules, and Probes
	// using the given PublicIPAddress IDs from the LoadBalancer.
	RemoveFromLoadBalancer(ctx context.Context, publicIPAddressIDs []string) error
	// Delete deletes the PublicIPAddress with the given name.
	Delete(ctx context.Context, name string) error
}

PublicIPAddressUtils provides utility methods for getting and cleaning Azure PublicIPAddress objects.

func NewPublicIPAddressUtils

func NewPublicIPAddressUtils(
	azureClients *azure.Clients,
	resourceGroup string,
	readRequestsCounter prometheus.Counter,
	writeRequestsCounter prometheus.Counter,
) PublicIPAddressUtils

NewPublicIPAddressUtils creates a new instance of PublicIPAddressUtils.

type VirtualMachineUtils

type VirtualMachineUtils interface {
	// Get returns the VirtualMachine with the given name, or nil if not found.
	Get(ctx context.Context, name string) (*compute.VirtualMachine, error)
	// Reapply reapplies the state of the VirtualMachine with the given name.
	Reapply(ctx context.Context, name string) error
}

VirtualMachineUtils provides utility methods for getting and reapplying Azure VirtualMachine objects.

func NewVirtualMachineUtils

func NewVirtualMachineUtils(
	azureClients *azure.Clients,
	resourceGroup string,
	readRequestsCounter prometheus.Counter,
	writeRequestsCounter prometheus.Counter,
) VirtualMachineUtils

NewVirtualMachineUtils creates a new instance of VirtualMachineUtils.

Jump to

Keyboard shortcuts

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