README
¶
HOW TO RUN TEST PROGRAM ON AZURE 1. ssh into drone1: Username: drone1 Password: dronedrone01 [COMMAND:] ssh drone1@20.36.20.142 ----------------------------------------------------- 2. ssh into drone2: This is just to make sure drone2 is alive Username: drone2 Password: dronedrone02 [COMMAND:] ssh drone2@20.190.48.49 ----------------------------------------------------- 3. Kill any ongoing hiv process on drone2 This will remove any process that is using our :6464 port. [COMMAND:] fuser 6464/tcp kill -s 9 <process id> ----------------------------------------------------- 4. If not touched, code should be already there on drone 1's proj2 directory. The pi_hivemind.go is the attempt for a remote version of pi.go. The simple_program_remote is a remote version of simpledsm.go. [COMMAND:] go run pi_hivemind.go [COMMAND:] go run simple_program_remote.go [NOTE:] Make sure the config.json has the following information (for running with 2 drones only) { "IsCBM": true, "Drones": [ { "Address": "20.190.48.49", "Port": "", "Username": "drone2", "Password": "DroneDrone02" } ], "CBM": "20.36.20.142", "DroneList": null } ----------------------------------------------------- 5. On drone2, check the log [COMMAND:] cd /tmp/hivemind cat run.log
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