Documentation
¶
Index ¶
- type Announced
- type CryptoFingerprintAnnouncedSyncMap
- func (m *CryptoFingerprintAnnouncedSyncMap) Delete(k crypto.Fingerprint)
- func (m *CryptoFingerprintAnnouncedSyncMap) Get(k crypto.Fingerprint) (*Announced, bool)
- func (m *CryptoFingerprintAnnouncedSyncMap) Put(k crypto.Fingerprint, v *Announced)
- func (m *CryptoFingerprintAnnouncedSyncMap) Range(i func(k crypto.Fingerprint, v *Announced) bool)
- type CryptoFingerprintPeerPeerSyncMap
- func (m *CryptoFingerprintPeerPeerSyncMap) Delete(k crypto.Fingerprint)
- func (m *CryptoFingerprintPeerPeerSyncMap) Get(k crypto.Fingerprint) (*peer.Peer, bool)
- func (m *CryptoFingerprintPeerPeerSyncMap) Put(k crypto.Fingerprint, v *peer.Peer)
- func (m *CryptoFingerprintPeerPeerSyncMap) Range(i func(k crypto.Fingerprint, v *peer.Peer) bool)
- type Discoverer
- func (r *Discoverer) FindByContent(ctx context.Context, contentHash string, opts ...discovery.Option) ([]crypto.Fingerprint, error)
- func (r *Discoverer) FindByFingerprint(ctx context.Context, fingerprint crypto.Fingerprint, opts ...discovery.Option) ([]*peer.Peer, error)
- func (r *Discoverer) LookupContentProvider(ctx context.Context, q bloom.Bloomer) ([]crypto.Fingerprint, error)
- func (r *Discoverer) LookupPeer(ctx context.Context, q *peer.Requested) ([]*peer.Peer, error)
- type Request
- type Store
- func (s *Store) AddContentHashes(c *Announced)
- func (s *Store) AddPeer(peer *peer.Peer)
- func (s *Store) FindByContent(b bloom.Bloomer) []*Announced
- func (s *Store) FindByFingerprint(fingerprint crypto.Fingerprint) []*peer.Peer
- func (s *Store) FindClosestContentProvider(q bloom.Bloomer) []*Announced
- func (s *Store) FindClosestPeer(f crypto.Fingerprint) []*peer.Peer
- type StringSyncList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Announced ¶
type CryptoFingerprintAnnouncedSyncMap ¶
type CryptoFingerprintAnnouncedSyncMap struct {
// contains filtered or unexported fields
}
CryptoFingerprintAnnouncedSyncMap -
func NewCryptoFingerprintAnnouncedSyncMap ¶
func NewCryptoFingerprintAnnouncedSyncMap() *CryptoFingerprintAnnouncedSyncMap
NewCryptoFingerprintAnnouncedSyncMap constructs a new SyncMap
func (*CryptoFingerprintAnnouncedSyncMap) Delete ¶
func (m *CryptoFingerprintAnnouncedSyncMap) Delete(k crypto.Fingerprint)
Delete -
func (*CryptoFingerprintAnnouncedSyncMap) Get ¶
func (m *CryptoFingerprintAnnouncedSyncMap) Get(k crypto.Fingerprint) (*Announced, bool)
Get -
func (*CryptoFingerprintAnnouncedSyncMap) Put ¶
func (m *CryptoFingerprintAnnouncedSyncMap) Put(k crypto.Fingerprint, v *Announced)
Put -
func (*CryptoFingerprintAnnouncedSyncMap) Range ¶
func (m *CryptoFingerprintAnnouncedSyncMap) Range(i func(k crypto.Fingerprint, v *Announced) bool)
Range -
type CryptoFingerprintPeerPeerSyncMap ¶ added in v0.4.0
type CryptoFingerprintPeerPeerSyncMap struct {
// contains filtered or unexported fields
}
CryptoFingerprintPeerPeerSyncMap -
func NewCryptoFingerprintPeerPeerSyncMap ¶ added in v0.4.0
func NewCryptoFingerprintPeerPeerSyncMap() *CryptoFingerprintPeerPeerSyncMap
NewCryptoFingerprintPeerPeerSyncMap constructs a new SyncMap
func (*CryptoFingerprintPeerPeerSyncMap) Delete ¶ added in v0.4.0
func (m *CryptoFingerprintPeerPeerSyncMap) Delete(k crypto.Fingerprint)
Delete -
func (*CryptoFingerprintPeerPeerSyncMap) Get ¶ added in v0.4.0
func (m *CryptoFingerprintPeerPeerSyncMap) Get(k crypto.Fingerprint) (*peer.Peer, bool)
Get -
func (*CryptoFingerprintPeerPeerSyncMap) Put ¶ added in v0.4.0
func (m *CryptoFingerprintPeerPeerSyncMap) Put(k crypto.Fingerprint, v *peer.Peer)
Put -
func (*CryptoFingerprintPeerPeerSyncMap) Range ¶ added in v0.4.0
func (m *CryptoFingerprintPeerPeerSyncMap) Range(i func(k crypto.Fingerprint, v *peer.Peer) bool)
Range -
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
Discoverer hyperspace
func NewDiscoverer ¶
func NewDiscoverer( ctx context.Context, network net.Network, exc exchange.Exchange, local *peer.LocalPeer, bootstrapAddresses []string, ) (*Discoverer, error)
NewDiscoverer returns a new hyperspace discoverer
func (*Discoverer) FindByContent ¶
func (r *Discoverer) FindByContent( ctx context.Context, contentHash string, opts ...discovery.Option, ) ([]crypto.Fingerprint, error)
FindByContent finds and returns peer infos from a content hash
func (*Discoverer) FindByFingerprint ¶
func (r *Discoverer) FindByFingerprint( ctx context.Context, fingerprint crypto.Fingerprint, opts ...discovery.Option, ) ([]*peer.Peer, error)
FindByFingerprint finds and returns peer infos from a fingerprint
func (*Discoverer) LookupContentProvider ¶ added in v0.4.0
func (r *Discoverer) LookupContentProvider( ctx context.Context, q bloom.Bloomer, ) ([]crypto.Fingerprint, error)
LookupContentProvider searches the network for content given a bloom filter
func (*Discoverer) LookupPeer ¶ added in v0.4.0
LookupPeer does a network lookup given a query
type Request ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds peer content blooms and their fingerprints
func (*Store) AddContentHashes ¶ added in v0.4.0
Add content hashes
func (*Store) FindByContent ¶
FindByContent returns peers that match a given content hash
func (*Store) FindByFingerprint ¶
func (s *Store) FindByFingerprint( fingerprint crypto.Fingerprint, ) []*peer.Peer
FindByFingerprint returns peers that are signed by a fingerprint
func (*Store) FindClosestContentProvider ¶ added in v0.4.0
FindClosestContentProvider returns peers that are "closet" to the given content
func (*Store) FindClosestPeer ¶ added in v0.4.0
func (s *Store) FindClosestPeer(f crypto.Fingerprint) []*peer.Peer
FindClosestPeer returns peers that closest resemble the query
type StringSyncList ¶ added in v0.4.0
type StringSyncList struct {
// contains filtered or unexported fields
}
StringSyncList -
func NewStringValueTypeSyncMap ¶ added in v0.4.0
func NewStringValueTypeSyncMap() *StringSyncList
NewStringValueTypeSyncMap constructs a new SyncMap
func (*StringSyncList) Exists ¶ added in v0.4.0
func (m *StringSyncList) Exists(k string) bool
Exists -
func (*StringSyncList) Range ¶ added in v0.4.0
func (m *StringSyncList) Range(i func(k string) bool)
Range -