tracker

package
v2.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(r []address.Range) []address.Range

Merge merges adjacent range entries. The given slice has to be sorted in increasing order.

func RemoveCommon

func RemoveCommon(a, b []address.CIDR) (newA, newB []address.CIDR)

RemoveCommon filters out CIDR ranges which are contained in both a and b slices. Both slices have to be sorted in increasing order.

Types

type AWSVPCTracker

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

func NewAWSVPCTracker

func NewAWSVPCTracker(bridgeName string) (*AWSVPCTracker, error)

NewAWSVPCTracker creates and initialises AWS VPC based tracker.

func (*AWSVPCTracker) HandleUpdate

func (t *AWSVPCTracker) HandleUpdate(prevRanges, currRanges []address.Range, local bool) error

HandleUpdate method updates the AWS VPC and the host route tables.

func (*AWSVPCTracker) String

func (t *AWSVPCTracker) String() string

type LocalRangeTracker

type LocalRangeTracker interface {
	// HandleUpdate is called whenever an address ring gets updated.
	//
	// prevRanges corresponds to ranges which were owned by a peer before
	// a change in the ring, while currRanges to the ones which are currently
	// owned by the peer.
	// Both slices have to be sorted in increasing order.
	// Adjacent ranges within each slice might appear as separate ranges.
	//
	// The local parameter indicates whether the ranges belong to the peer
	// by which the method is called.
	HandleUpdate(prevRanges, currRanges []address.Range, local bool) error

	// String returns the tracker name
	String() string
}

LocalRangeTracker is an interface for tracking changes in the IPAM ring.

Jump to

Keyboard shortcuts

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