Documentation ¶
Index ¶
- func JoinCluster(ip string, port int, key string) (Master, Peer, error)
- type Master
- func (this Master) Broadcast(info string) error
- func (this Master) CloseCluster() error
- func (this Master) FetchPeerList() []Peer
- func (this Master) GetPrivateKey() string
- func (this Master) GetPublicKey() string
- func (this Master) Listen() error
- func (this Master) SendInfoToPeer(peer Peer, info string) error
- type Peer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Master ¶
type Master struct { IP string `json:"ip"` Port int `json:"port"` Info string `json:"info"` Peers []Peer `json:"peers"` Puk string `json:"puk"` Prk string `json:"prk"` }
func (Master) CloseCluster ¶
func (Master) FetchPeerList ¶
func (Master) GetPrivateKey ¶
func (Master) GetPublicKey ¶
Click to show internal directories.
Click to hide internal directories.