operator

package
v0.12.0-beta.0 Latest Latest
Warning

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

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

Documentation

Overview

Package operator implements network operators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCP4

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

DHCP4 implements the DHCPv4 network operator.

func NewDHCP4

func NewDHCP4(logger *zap.Logger, linkName string, routeMetric uint32, platform runtime.Platform) *DHCP4

NewDHCP4 creates DHCPv4 operator.

func (*DHCP4) AddressSpecs

func (d *DHCP4) AddressSpecs() []network.AddressSpecSpec

AddressSpecs implements Operator interface.

func (*DHCP4) HostnameSpecs

func (d *DHCP4) HostnameSpecs() []network.HostnameSpecSpec

HostnameSpecs implements Operator interface.

func (*DHCP4) LinkSpecs

func (d *DHCP4) LinkSpecs() []network.LinkSpecSpec

LinkSpecs implements Operator interface.

func (*DHCP4) Prefix

func (d *DHCP4) Prefix() string

Prefix returns unique operator prefix which gets prepended to each spec.

func (*DHCP4) ResolverSpecs

func (d *DHCP4) ResolverSpecs() []network.ResolverSpecSpec

ResolverSpecs implements Operator interface.

func (*DHCP4) RouteSpecs

func (d *DHCP4) RouteSpecs() []network.RouteSpecSpec

RouteSpecs implements Operator interface.

func (*DHCP4) Run

func (d *DHCP4) Run(ctx context.Context, notifyCh chan<- struct{})

Run the operator loop.

func (*DHCP4) TimeServerSpecs

func (d *DHCP4) TimeServerSpecs() []network.TimeServerSpecSpec

TimeServerSpecs implements Operator interface.

type DHCP6

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

DHCP6 implements the DHCPv6 network operator.

func NewDHCP6

func NewDHCP6(logger *zap.Logger, linkName string) *DHCP6

NewDHCP6 creates DHCPv6 operator.

func (*DHCP6) AddressSpecs

func (d *DHCP6) AddressSpecs() []network.AddressSpecSpec

AddressSpecs implements Operator interface.

func (*DHCP6) HostnameSpecs

func (d *DHCP6) HostnameSpecs() []network.HostnameSpecSpec

HostnameSpecs implements Operator interface.

func (*DHCP6) LinkSpecs

func (d *DHCP6) LinkSpecs() []network.LinkSpecSpec

LinkSpecs implements Operator interface.

func (*DHCP6) Prefix

func (d *DHCP6) Prefix() string

Prefix returns unique operator prefix which gets prepended to each spec.

func (*DHCP6) ResolverSpecs

func (d *DHCP6) ResolverSpecs() []network.ResolverSpecSpec

ResolverSpecs implements Operator interface.

func (*DHCP6) RouteSpecs

func (d *DHCP6) RouteSpecs() []network.RouteSpecSpec

RouteSpecs implements Operator interface.

func (*DHCP6) Run

func (d *DHCP6) Run(ctx context.Context, notifyCh chan<- struct{})

Run the operator loop.

func (*DHCP6) TimeServerSpecs

func (d *DHCP6) TimeServerSpecs() []network.TimeServerSpecSpec

TimeServerSpecs implements Operator interface.

type Operator

type Operator interface {
	Run(ctx context.Context, notifyCh chan<- struct{})

	Prefix() string

	AddressSpecs() []network.AddressSpecSpec
	RouteSpecs() []network.RouteSpecSpec
	LinkSpecs() []network.LinkSpecSpec

	HostnameSpecs() []network.HostnameSpecSpec
	ResolverSpecs() []network.ResolverSpecSpec
	TimeServerSpecs() []network.TimeServerSpecSpec
}

Operator describes common interface of the operators.

type VIP

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

VIP implements the Virtual (Shared) IP network operator.

func NewVIP

func NewVIP(logger *zap.Logger, linkName string, spec network.VIPOperatorSpec, state state.State) *VIP

NewVIP creates Virtual IP operator.

func (*VIP) AddressSpecs

func (vip *VIP) AddressSpecs() []network.AddressSpecSpec

AddressSpecs implements Operator interface.

func (*VIP) HostnameSpecs

func (vip *VIP) HostnameSpecs() []network.HostnameSpecSpec

HostnameSpecs implements Operator interface.

func (*VIP) LinkSpecs

func (vip *VIP) LinkSpecs() []network.LinkSpecSpec

LinkSpecs implements Operator interface.

func (*VIP) Prefix

func (vip *VIP) Prefix() string

Prefix returns unique operator prefix which gets prepended to each spec.

func (*VIP) ResolverSpecs

func (vip *VIP) ResolverSpecs() []network.ResolverSpecSpec

ResolverSpecs implements Operator interface.

func (*VIP) RouteSpecs

func (vip *VIP) RouteSpecs() []network.RouteSpecSpec

RouteSpecs implements Operator interface.

func (*VIP) Run

func (vip *VIP) Run(ctx context.Context, notifyCh chan<- struct{})

Run the operator loop.

func (*VIP) TimeServerSpecs

func (vip *VIP) TimeServerSpecs() []network.TimeServerSpecSpec

TimeServerSpecs implements Operator interface.

Directories

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

Jump to

Keyboard shortcuts

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