ndp

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announce

type Announce struct {
	sync.RWMutex // protects ips
	// contains filtered or unexported fields
}

Announce is used to "announce" new IPs mapped to the node's MAC address.

func New

func New(ip net.IP) (*Announce, error)

New returns an initialized Announce.

func (*Announce) Acquire

func (a *Announce) Acquire()

Acquire sets the leader bit to true and sends out unsolicited NDP neighbor advertisements for all VIPs that should be announced. It does this repeatedly - every 0.5s - for a duration of 5 seconds.

func (*Announce) Advertise

func (a *Announce) Advertise()

Advertise sends unsolicited NDP neighbor advertisements for all IPs.

func (*Announce) Announce

func (a *Announce) Announce(ip net.IP) bool

Announce checks if ip should be announced.

func (*Announce) AnnounceName

func (a *Announce) AnnounceName(name string) bool

AnnounceName returns true when we have an announcement under name.

func (*Announce) Close

func (a *Announce) Close() error

Close closes the ndp client in a.

func (*Announce) DeleteBalancer

func (a *Announce) DeleteBalancer(name string)

DeleteBalancer deletes an address from the set of addresses we should announce.

func (*Announce) Leader

func (a *Announce) Leader() bool

Leader returns true if we are the leader in the daemon set.

func (*Announce) Relinquish

func (a *Announce) Relinquish()

Relinquish set the leader bit to false and stops the goroutine that sends unsolicited NDP neighbor advertisement messages.

func (*Announce) Run

func (a *Announce) Run()

Run starts the announcer, making it listen on the interface for NDP requests. It only responds to these requests when a.leader is set to true, i.e. we are the current cluster wide leader for sending NDP messages.

func (*Announce) SetBalancer

func (a *Announce) SetBalancer(name string, ip net.IP)

SetBalancer adds ip to the set of announced addresses.

func (*Announce) SetLeader

func (a *Announce) SetLeader(b bool)

SetLeader sets the leader boolean to b.

Jump to

Keyboard shortcuts

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