vip

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package vip contains implementations of specific methods to acquire/release virtual IPs.

Index

Constants

View Source
const EquinixMetalMetaDataEndpoint = "https://metadata.platformequinix.com/metadata"

EquinixMetalMetaDataEndpoint is the local endpoint for machine info like networking.

View Source
const HCloudMetaDataEndpoint = "http://169.254.169.254/hetzner/v1/metadata/instance-id"

HCloudMetaDataEndpoint is the local endpoint for machine info like networking.

Variables

This section is empty.

Functions

func GetNetworkAndDeviceIDs added in v0.13.0

func GetNetworkAndDeviceIDs(ctx context.Context, spec *network.VIPHCloudSpec, vip netaddr.IP) error

GetNetworkAndDeviceIDs fills in parts of the spec based on the API token and instance metadata.

func GetProjectAndDeviceIDs

func GetProjectAndDeviceIDs(ctx context.Context, spec *network.VIPEquinixMetalSpec) error

GetProjectAndDeviceIDs fills in parts of the spec based on the API token and instance metadata.

Types

type EquinixMetalHandler

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

EquinixMetalHandler implements assignment and release of Virtual IPs using API.

func NewEquinixMetalHandler

func NewEquinixMetalHandler(logger *zap.Logger, vip string, spec network.VIPEquinixMetalSpec) *EquinixMetalHandler

NewEquinixMetalHandler creates new EquinixMetalHandler.

func (*EquinixMetalHandler) Acquire

func (handler *EquinixMetalHandler) Acquire(ctx context.Context) error

Acquire implements Handler interface.

func (*EquinixMetalHandler) Release

func (handler *EquinixMetalHandler) Release(ctx context.Context) error

Release implements Handler interface.

type HCloudHandler added in v0.13.0

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

HCloudHandler implements assignment and release of Virtual IPs using API.

func NewHCloudHandler added in v0.13.0

func NewHCloudHandler(logger *zap.Logger, vip string, spec network.VIPHCloudSpec) *HCloudHandler

NewHCloudHandler creates new NewEHCloudHandler.

func (*HCloudHandler) Acquire added in v0.13.0

func (handler *HCloudHandler) Acquire(ctx context.Context) error

Acquire implements Handler interface.

func (*HCloudHandler) Release added in v0.13.0

func (handler *HCloudHandler) Release(ctx context.Context) error

Release implements Handler interface.

type Handler

type Handler interface {
	Acquire(ctx context.Context) error
	Release(ctx context.Context) error
}

Handler implements custom actions to manage virtual IP assignment.

type NopHandler

type NopHandler struct{}

NopHandler does nothing.

func (NopHandler) Acquire

func (handler NopHandler) Acquire(ctx context.Context) error

Acquire implements Handler interface.

func (NopHandler) Release

func (handler NopHandler) Release(ctx context.Context) error

Release implements Handler interface.

Jump to

Keyboard shortcuts

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