anchor

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

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

Allocator is the allocator for anchor.

func NewAllocator

func NewAllocator(store store.Store,
	pod, namespace string,
	customized map[string]string) (*Allocator, error)

NewAllocator news a allocator

func (*Allocator) AddServiceRoute

func (a *Allocator) AddServiceRoute(ret *current.Result,
	serviceClusterIPRange string,
	nodeIPs []string) (*current.Result, error)

AddServiceRoute adds route for serice cluster ip range.

func (*Allocator) Allocate

func (a *Allocator) Allocate(id string) (*current.IPConfig, error)

Allocate allocates IP for the pod.

func (*Allocator) CustomizeDNS

func (a *Allocator) CustomizeDNS(ret *current.Result) (*current.Result, error)

CustomizeDNS configs the DNS for pod, but not implemented now.

func (*Allocator) CustomizeGateway

func (a *Allocator) CustomizeGateway(ret *current.Result) (*current.Result, error)

CustomizeGateway adds default route for pod if customizeGatewayKey is set.

func (*Allocator) CustomizeRoutes

func (a *Allocator) CustomizeRoutes(ret *current.Result) (*current.Result, error)

CustomizeRoutes adds routes if customizeRouteKey is set. The format of input should as: 10.0.1.0/24,10.0.1.1;10.0.5.0/24,10.0.5.1 The outer delimiter is semicolon(;) and the inner delimiter is comma(,)

type Cleaner

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

Cleaner is the cleaner for anchor.

func NewCleaner

func NewCleaner(store store.Store, pod, namespace string) (*Cleaner, error)

NewCleaner news a cleaner for anchor.

func (*Cleaner) Clean

func (a *Cleaner) Clean(id string) error

Clean cleans the IP for the pod.

Jump to

Keyboard shortcuts

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