Documentation ¶
Index ¶
- type FullStatus
- type LocalPeerState
- type ManagementState
- type PeerState
- type SignalState
- type Status
- func (d *Status) AddPeer(peerPubKey string) error
- func (d *Status) CleanLocalPeerState()
- func (d *Status) GetFullStatus() FullStatus
- func (d *Status) MarkManagementConnected(managementURL string)
- func (d *Status) MarkManagementDisconnected(managementURL string)
- func (d *Status) MarkSignalConnected(signalURL string)
- func (d *Status) MarkSignalDisconnected(signalURL string)
- func (d *Status) RemovePeer(peerPubKey string) error
- func (d *Status) UpdateLocalPeerState(localPeerState LocalPeerState)
- func (d *Status) UpdatePeerState(receivedState PeerState) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FullStatus ¶
type FullStatus struct { Peers []PeerState ManagementState ManagementState SignalState SignalState LocalPeerState LocalPeerState }
FullStatus contains the full state held by the Status instance
type LocalPeerState ¶
LocalPeerState contains the latest state of the local peer
type ManagementState ¶
ManagementState contains the latest state of a management connection
type PeerState ¶
type PeerState struct { IP string PubKey string ConnStatus string ConnStatusUpdate time.Time Relayed bool Direct bool LocalIceCandidateType string RemoteIceCandidateType string }
PeerState contains the latest state of a peer
type SignalState ¶
SignalState contains the latest state of a signal connection
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status holds a state of peers, signal and management connections
func (*Status) CleanLocalPeerState ¶
func (d *Status) CleanLocalPeerState()
CleanLocalPeerState cleans local peer status
func (*Status) GetFullStatus ¶
func (d *Status) GetFullStatus() FullStatus
GetFullStatus gets full status
func (*Status) MarkManagementConnected ¶
MarkManagementConnected sets ManagementState to connected
func (*Status) MarkManagementDisconnected ¶
MarkManagementDisconnected sets ManagementState to disconnected
func (*Status) MarkSignalConnected ¶
MarkSignalConnected sets SignalState to connected
func (*Status) MarkSignalDisconnected ¶
MarkSignalDisconnected sets SignalState to disconnected
func (*Status) RemovePeer ¶
RemovePeer removes peer from Daemon status map
func (*Status) UpdateLocalPeerState ¶
func (d *Status) UpdateLocalPeerState(localPeerState LocalPeerState)
UpdateLocalPeerState updates local peer status
func (*Status) UpdatePeerState ¶
UpdatePeerState updates peer status