Documentation ¶
Index ¶
- type Peer
- func (p *Peer) CompareContent(contentList []string) []interface{}
- func (p *Peer) GetContentLinks(contentList []string) map[string][]string
- func (p *Peer) GetState() *state.State
- func (p *Peer) Join(ipList []string) error
- func (p *Peer) SetState(s *state.State)
- func (p *Peer) StopAndLeave() error
- func (p *Peer) UpdateAndPushState(sm *signature.SignedMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { PeerQueue *memberlist.TransmitLimitedQueue // contains filtered or unexported fields }
Peer is a type that represents a peer in the Gladius p2p network.
func (*Peer) CompareContent ¶
CompareContent compares the content provided with the content in the state and returns a list of the missing files names in the format of: website/<"asset" or "route">/filename
func (*Peer) GetContentLinks ¶
GetContentLinks returns a map mapping a file name to all the places it can be found on the network
func (*Peer) StopAndLeave ¶
StopAndLeave will infomr the network of it leaving and shutdown
func (*Peer) UpdateAndPushState ¶
func (p *Peer) UpdateAndPushState(sm *signature.SignedMessage) error
UpdateAndPushState updates the local state and pushes it to several other peers
Click to show internal directories.
Click to hide internal directories.