vip

package
v0.12.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Overview

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

Index

Constants

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

PacketMetaDataEndpoint is the local endpoint for machine info like networking.

Variables

This section is empty.

Functions

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 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