Documentation
¶
Index ¶
- func ConnectPeers(ctx context.Context, h host.Host, infos []peer.AddrInfo, concurrency int, ...) (int, error)
- func LoadOrCreateIdentity(path string) (crypto.PrivKey, error)
- func MergeTargets(bootstrap []peer.AddrInfo, remembered []peer.AddrInfo) []peer.AddrInfo
- func New(cfg *config.Config, priv crypto.PrivKey, psk []byte) (host.Host, error)
- func NewDHT(ctx context.Context, h host.Host, prefix string) (*dht.IpfsDHT, error)
- func ParsePeerAddrs(addrs []string) ([]peer.AddrInfo, error)
- type PeerMemory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectPeers ¶
func MergeTargets ¶
Types ¶
type PeerMemory ¶
type PeerMemory struct {
// contains filtered or unexported fields
}
func LoadPeerMemory ¶
func LoadPeerMemory(path string, maxPeers, maxAddrs int, ttl time.Duration) *PeerMemory
func (*PeerMemory) DialTargets ¶
func (pm *PeerMemory) DialTargets(self peer.ID) []peer.AddrInfo
func (*PeerMemory) Save ¶
func (pm *PeerMemory) Save()
func (*PeerMemory) Snapshot ¶
func (pm *PeerMemory) Snapshot(h host.Host)
Click to show internal directories.
Click to hide internal directories.