Documentation ¶
Index ¶
- type MySQL
- func (r *MySQL) AddHost(host network.HostParam) (hostID uint64, err error)
- func (r *MySQL) AddNetwork(addr net.IP, mask net.IPMask) (netID uint64, err error)
- func (r *MySQL) AddSwitch(sw network.SwitchParam) (swID uint64, err error)
- func (r *MySQL) AddVIP(vip network.VIPParam) (id uint64, cidr string, err error)
- func (r *MySQL) Elect(uid string, expiration time.Duration) (elected bool, err error)
- func (r *MySQL) GetActivatedHosts() (hosts []proxyarp.Host, err error)
- func (r *MySQL) GetActivatedVIPs() (result []virtualip.Address, err error)
- func (r *MySQL) GetUndiscoveredHosts(expiration time.Duration) (result []net.IP, err error)
- func (r *MySQL) Host(id uint64) (host network.Host, ok bool, err error)
- func (r *MySQL) Hosts() (hosts []network.Host, err error)
- func (r *MySQL) IPAddrs(networkID uint64) (addresses []network.IP, err error)
- func (r *MySQL) Location(mac net.HardwareAddr) (dpid string, port uint32, status network.LocationStatus, err error)
- func (r *MySQL) MAC(ip net.IP) (mac net.HardwareAddr, ok bool, err error)
- func (r *MySQL) MACAddrs() (result []net.HardwareAddr, err error)
- func (r *MySQL) Network(addr net.IP) (n network.Network, ok bool, err error)
- func (r *MySQL) Networks() (networks []network.Network, err error)
- func (r *MySQL) RemoveHost(id uint64) (ok bool, err error)
- func (r *MySQL) RemoveNetwork(id uint64) (ok bool, err error)
- func (r *MySQL) RemoveSwitch(id uint64) (ok bool, err error)
- func (r *MySQL) RemoveVIP(id uint64) (ok bool, err error)
- func (r *MySQL) ResetHostLocationsByDevice(swDPID uint64) error
- func (r *MySQL) ResetHostLocationsByPort(swDPID uint64, portNum uint16) error
- func (r *MySQL) Switch(dpid uint64) (sw network.Switch, ok bool, err error)
- func (r *MySQL) SwitchPorts(swID uint64) (ports []network.SwitchPort, err error)
- func (r *MySQL) Switches() (sw []network.Switch, err error)
- func (r *MySQL) ToggleDeviceVIP(swDPID uint64) (result []virtualip.Address, err error)
- func (r *MySQL) TogglePortVIP(swDPID uint64, portNum uint16) (result []virtualip.Address, err error)
- func (r *MySQL) ToggleVIP(id uint64) (ip net.IP, mac net.HardwareAddr, err error)
- func (r *MySQL) UpdateHostLocation(mac net.HardwareAddr, ip net.IP, swDPID uint64, portNum uint16) (updated bool, err error)
- func (r *MySQL) VIPs() (result []network.VIP, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) AddNetwork ¶
func (*MySQL) AddSwitch ¶
func (r *MySQL) AddSwitch(sw network.SwitchParam) (swID uint64, err error)
func (*MySQL) Elect ¶ added in v0.13.0
Elect selects a new master as uid if there is a no existing master that has been updated within expiration. elected will be true if this uid has been elected as the new master or was already elected.
func (*MySQL) GetActivatedHosts ¶ added in v0.13.0
func (*MySQL) GetActivatedVIPs ¶ added in v0.13.0
func (*MySQL) GetUndiscoveredHosts ¶ added in v0.13.0
GetUndiscoveredHosts returns IP addresses whose physical location is still undiscovered or staled more than expiration. result can be nil on empty result.
func (*MySQL) Location ¶
func (r *MySQL) Location(mac net.HardwareAddr) (dpid string, port uint32, status network.LocationStatus, err error)
func (*MySQL) MACAddrs ¶ added in v0.13.0
func (r *MySQL) MACAddrs() (result []net.HardwareAddr, err error)
MACAddrs returns all the registered MAC addresses.
func (*MySQL) ResetHostLocationsByDevice ¶ added in v0.13.0
ResetHostLocationsByDevice sets NULL to the host locations that belong to the device specified by swDPID.
func (*MySQL) ResetHostLocationsByPort ¶ added in v0.13.0
ResetHostLocationsByPort sets NULL to the host locations that belong to the port specified by swDPID and portNum.
func (*MySQL) SwitchPorts ¶
func (r *MySQL) SwitchPorts(swID uint64) (ports []network.SwitchPort, err error)
func (*MySQL) ToggleDeviceVIP ¶
func (*MySQL) TogglePortVIP ¶
func (*MySQL) UpdateHostLocation ¶ added in v0.13.0
func (r *MySQL) UpdateHostLocation(mac net.HardwareAddr, ip net.IP, swDPID uint64, portNum uint16) (updated bool, err error)
UpdateHostLocation updates the physical location of a host, whose MAC and IP addresses are matched with mac and ip, to the port identified by swDPID and portNum. updated will be true if its location has been actually updated.