Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- type Config
- type ConnectionDirection
- type ConnectionState
- type Destination
- type DummyClient
- type IPVersion
- type MESSAGE_TYPE
- type MetalBond
- func (m *MetalBond) AddPeer(addr, localIP string) error
- func (m *MetalBond) AnnounceRoute(vni VNI, dest Destination, hop NextHop) error
- func (m *MetalBond) GetRoutesForVni(vni VNI) error
- func (m *MetalBond) GetSubscribedVnis() []VNI
- func (m *MetalBond) IsRouteAnnounced(vni VNI, dest Destination, hop NextHop) bool
- func (m *MetalBond) IsSubscribed(vni VNI) bool
- func (m *MetalBond) PeerState(addr string) (ConnectionState, error)
- func (m *MetalBond) RemovePeer(addr string) error
- func (m *MetalBond) Shutdown()
- func (m *MetalBond) StartHTTPServer(listen string) error
- func (m *MetalBond) StartServer(listenAddress string) error
- func (m *MetalBond) Subscribe(vni VNI) error
- func (m *MetalBond) Unsubscribe(vni VNI) error
- func (m *MetalBond) WithdrawRoute(vni VNI, dest Destination, hop NextHop) error
- type NetlinkClient
- type NetlinkClientConfig
- type NextHop
- type UpdateAction
- type VNI
Constants ¶
View Source
const METALBOND_RT_PROTO netlink.RouteProtocol = 254
Variables ¶
View Source
var METALBOND_VERSION string
View Source
var RetryIntervalMax = 5
View Source
var RetryIntervalMin = 5
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AddRoute(vni VNI, dest Destination, nexthop NextHop) error RemoveRoute(vni VNI, dest Destination, nexthop NextHop) error }
type ConnectionDirection ¶
type ConnectionDirection uint8
const ( INCOMING ConnectionDirection = iota OUTGOING )
type ConnectionState ¶
type ConnectionState uint8
const ( CONNECTING ConnectionState = iota HELLO_SENT HELLO_RECEIVED ESTABLISHED RETRY CLOSED )
func (ConnectionState) String ¶
func (cs ConnectionState) String() string
type Destination ¶
func (Destination) String ¶
func (d Destination) String() string
type DummyClient ¶
type DummyClient struct{}
func NewDummyClient ¶
func NewDummyClient() *DummyClient
func (DummyClient) AddRoute ¶
func (c DummyClient) AddRoute(vni VNI, dest Destination, nexthop NextHop) error
func (DummyClient) RemoveRoute ¶
func (c DummyClient) RemoveRoute(vni VNI, dest Destination, nexthop NextHop) error
type MESSAGE_TYPE ¶
type MESSAGE_TYPE uint8
const ( HELLO MESSAGE_TYPE = 1 KEEPALIVE MESSAGE_TYPE = 2 SUBSCRIBE MESSAGE_TYPE = 3 UNSUBSCRIBE MESSAGE_TYPE = 4 UPDATE MESSAGE_TYPE = 5 )
type MetalBond ¶
type MetalBond struct {
// contains filtered or unexported fields
}
func NewMetalBond ¶
func (*MetalBond) AnnounceRoute ¶
func (m *MetalBond) AnnounceRoute(vni VNI, dest Destination, hop NextHop) error
func (*MetalBond) GetRoutesForVni ¶
func (*MetalBond) GetSubscribedVnis ¶
func (*MetalBond) IsRouteAnnounced ¶
func (m *MetalBond) IsRouteAnnounced(vni VNI, dest Destination, hop NextHop) bool
func (*MetalBond) IsSubscribed ¶
func (*MetalBond) RemovePeer ¶
func (*MetalBond) StartHTTPServer ¶
func (*MetalBond) StartServer ¶
StartServer starts the MetalBond server asynchronously. To stop the server again, call Shutdown().
func (*MetalBond) Unsubscribe ¶
func (*MetalBond) WithdrawRoute ¶
func (m *MetalBond) WithdrawRoute(vni VNI, dest Destination, hop NextHop) error
type NetlinkClient ¶
type NetlinkClient struct {
// contains filtered or unexported fields
}
func NewNetlinkClient ¶
func NewNetlinkClient(config NetlinkClientConfig) (*NetlinkClient, error)
func (*NetlinkClient) AddRoute ¶
func (c *NetlinkClient) AddRoute(vni VNI, dest Destination, hop NextHop) error
func (*NetlinkClient) RemoveRoute ¶
func (c *NetlinkClient) RemoveRoute(vni VNI, dest Destination, hop NextHop) error
type NetlinkClientConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.