Documentation
¶
Index ¶
- Constants
- type BeaconManager
- func (bm *BeaconManager) CreateBaseRouteBeacon()
- func (bm *BeaconManager) CreateEdgeRouteBeacon(actionFunc func(map[string]string))
- func (bm *BeaconManager) CreatePeerRouteBeacon(actionFunc func(map[string]string))
- func (bm *BeaconManager) StartBaseRouteAnnouncement(baseRouteBeaconKey *rsa.PublicKey)
- func (bm *BeaconManager) StartEdgeRouteAnnouncement(edgeRouteBeaconKey *rsa.PublicKey)
- func (bm *BeaconManager) StartEdgeRouteRequest(baseRouteBeaconKey *rsa.PublicKey)
- func (bm *BeaconManager) StartPeerRouteAnnouncement()
- func (bm *BeaconManager) StartPeerRouteRequest(peerPubKeyHash string)
- func (bm *BeaconManager) StopBaseRouteAnnouncement()
- func (bm *BeaconManager) StopEdgeRouteRequest()
- func (bm *BeaconManager) StopPeerRouteAnnouncement()
- func (bm *BeaconManager) StopPeerRouteRequest(peerPubKeyHash string)
- type ChanSet
- type Config
- type MDHT
- func (m *MDHT) AnnouncementBeacon(stop *chan bool, pubKey *rsa.PublicKey, initDelaySeconds int, delaySeconds int) error
- func (m *MDHT) RequestBeacon(stop *chan bool, peerPubKeyHash string, action string, actionArgs []string, ...)
- func (m *MDHT) Run() (err error)
- func (m *MDHT) SelfAnnouncementBeacon(stop *chan bool, initDelaySeconds int, delaySeconds int) error
- type PeerChan
Constants ¶
View Source
const BEACON_INTERVAL = 5
View Source
const EDGE_REQUEST_RESPONSE = "edge_response"
View Source
const PEER_REQUEST_RESPONSE = "peer_response"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconManager ¶
type BeaconManager struct {
// contains filtered or unexported fields
}
func GetBeaconManager ¶
func GetBeaconManager() *BeaconManager
returns the singleton to BeaconManager
func (*BeaconManager) CreateBaseRouteBeacon ¶
func (bm *BeaconManager) CreateBaseRouteBeacon()
===== Base Route Beacon =====
Creates a new beacon for base route announcement and requests.
func (*BeaconManager) CreateEdgeRouteBeacon ¶
func (bm *BeaconManager) CreateEdgeRouteBeacon(actionFunc func(map[string]string))
===== Edge Route Beacon =====
Creates a new beacon for edge route announcement and requests.
func (*BeaconManager) CreatePeerRouteBeacon ¶
func (bm *BeaconManager) CreatePeerRouteBeacon(actionFunc func(map[string]string))
===== Peer Route Beacon =====
Creates a new beacon for peer route announcement and requests.
func (*BeaconManager) StartBaseRouteAnnouncement ¶
func (bm *BeaconManager) StartBaseRouteAnnouncement(baseRouteBeaconKey *rsa.PublicKey)
Announce on the base route beacon that this node is a part of the base route
func (*BeaconManager) StartEdgeRouteAnnouncement ¶
func (bm *BeaconManager) StartEdgeRouteAnnouncement(edgeRouteBeaconKey *rsa.PublicKey)
Announce on the edge route beacon that this node is a part of the edge route
func (*BeaconManager) StartEdgeRouteRequest ¶
func (bm *BeaconManager) StartEdgeRouteRequest(baseRouteBeaconKey *rsa.PublicKey)
Start requesting for responses from peers on the base route
func (*BeaconManager) StartPeerRouteAnnouncement ¶
func (bm *BeaconManager) StartPeerRouteAnnouncement()
Start announcing this node's PubKeyHash on the peer route
func (*BeaconManager) StartPeerRouteRequest ¶
func (bm *BeaconManager) StartPeerRouteRequest(peerPubKeyHash string)
Start requesting for peerPubKeyHash on the peer route
func (*BeaconManager) StopBaseRouteAnnouncement ¶
func (bm *BeaconManager) StopBaseRouteAnnouncement()
Stop announcing on the base route
func (*BeaconManager) StopEdgeRouteRequest ¶
func (bm *BeaconManager) StopEdgeRouteRequest()
Stop requesting for responses from peers on the base route
func (*BeaconManager) StopPeerRouteAnnouncement ¶
func (bm *BeaconManager) StopPeerRouteAnnouncement()
Stop announcing on the peer route
func (*BeaconManager) StopPeerRouteRequest ¶
func (bm *BeaconManager) StopPeerRouteRequest(peerPubKeyHash string)
type MDHT ¶
type MDHT struct { DHT *dht_lib.DHT //dynamic DHT router ip DiscoveredDHTRouterIP *map[string]int DiscoveredInfohash map[string]int AllowedPubKey *map[string]int PeerRouteActionHandlerMapping map[string]func(map[string]string) Log *mlog.Mlog sync.Mutex // contains filtered or unexported fields }
func (*MDHT) AnnouncementBeacon ¶
func (m *MDHT) AnnouncementBeacon(stop *chan bool, pubKey *rsa.PublicKey, initDelaySeconds int, delaySeconds int) error
Create a beacon to announce a pkh
Click to show internal directories.
Click to hide internal directories.