Documentation ¶
Index ¶
Constants ¶
View Source
const ( PeerInfoFilePath = "/home/prapti_shah/peer_info.json" PeerConnectionTimeout = 30 * time.Second )
View Source
const MessageProtocol = "/keeper/message/1.0.0"
Variables ¶
View Source
var KeeperConfigs = map[string]string{
"Frodo": "/ip4/127.0.0.1/tcp/3000",
"Sam": "/ip4/127.0.0.1/tcp/3001",
"Merry": "/ip4/127.0.0.1/tcp/3002",
"Pippin": "/ip4/127.0.0.1/tcp/3003",
}
Functions ¶
func LoadPeerInfo ¶
LoadPeerInfo loads peer information from the JSON file
Types ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
func (*Discovery) ConnectToPeer ¶
ConnectToPeer connects to a specific peer
func (*Discovery) SavePeerInfo ¶
SavePeerInfo saves peer information to a JSON file
type Messaging ¶
type Messaging struct {
// contains filtered or unexported fields
}
func (*Messaging) InitMessageHandling ¶
Click to show internal directories.
Click to hide internal directories.