Documentation ¶
Overview ¶
Package hivemind implements the TreadMarks API.
This file contains the implementation of the inter-processor messaging layer. This implements a fast, reliable point-to-point communications between this node and all other nodes in the DSM
Index ¶
- func GetOutboundIP() string
- func GetOutboundIPKvm() string
- func HandleIncomingCBMConnection(conn net.Conn)
- func StartCBMServer() (string, error)
- func StartNodes(inList []configs.DroneManagerConfig) (int, []configs.DroneConfig, error)
- type Ipc
- type IpcArgs
- type IpcMessage
- type Peer
- type PeerMap
- func (pm *PeerMap) AddPeer(pid uint8, peer Peer)
- func (pm *PeerMap) DeepCopy() PeerMap
- func (pm *PeerMap) GetPeer(pid uint8) (Peer, bool)
- func (pm *PeerMap) GetPeerConn(pid uint8) (net.Conn, bool)
- func (pm *PeerMap) Initialize()
- func (pm *PeerMap) KeyList() []uint8
- func (pm *PeerMap) NumPeers() int
- func (pm *PeerMap) RemovePeer(pid uint8)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOutboundIP ¶
func GetOutboundIP() string
https://gist.github.com/jniltinho/9788121 function to get the public ip address we assume we are connected to external internet
func GetOutboundIPKvm ¶
func GetOutboundIPKvm() string
GetOutboundIPKvm Function to grab outbound IP for use with KVM system
func HandleIncomingCBMConnection ¶
Handler for incoming drone connection to CBM
func StartCBMServer ¶
Listen for TCP connections from other drones to CBM
func StartNodes ¶
func StartNodes(inList []configs.DroneManagerConfig) (int, []configs.DroneConfig, error)
given a list of IP address, start drones on each machine also requires username:password for ssh password as hardcoded string is bad for security, but acceptable for project purposes returns number of drones successfully started returns a mapping of drone addresses to pid
Types ¶
type Ipc ¶
type Ipc struct {
// contains filtered or unexported fields
}
Ipc structure defines the properties of an Ipc instance
type IpcArgs ¶
type IpcArgs struct { VC []uint Interval int PageID int DiffID int Diff int PageCopy int Copyset int }
Temporary all ints, please modify to the type you needed when use
type PeerMap ¶
type PeerMap struct {
// contains filtered or unexported fields
}
func (*PeerMap) GetPeerConn ¶
Return conn of peer, and its existence
func (*PeerMap) RemovePeer ¶
Remove peer and its connection from map