Documentation
¶
Index ¶
Constants ¶
View Source
const (
ErrNoPeersToAsk = errors.Error("no peers to ask")
)
Variables ¶
This section is empty.
Functions ¶
func WithBoostrapPeers ¶
func WithBoostrapPeers(ps ...*peer.ConnectionInfo) func(*resolver)
WithBoostrapPeers overrides the default bootstrap peers for the resolver.
Types ¶
type LookupOption ¶
type LookupOption func(*LookupOptions)
LookupOptions
func LookupByHash ¶ added in v0.19.0
func LookupByHash(hash tilde.Digest) LookupOption
LookupByHash matches content hashes
func LookupByPeerKey ¶ added in v0.14.1
func LookupByPeerKey(keys ...crypto.PublicKey) LookupOption
LookupByPeerKey matches the peer key
func LookupOnlyLocal ¶
func LookupOnlyLocal() LookupOption
LookupOnlyLocal forces the discoverer to only look at its cache
type LookupOptions ¶
type LookupOptions struct { Local bool // Lookups are strings we are looking for, will be used to create a // bloom filter when forwarding the lookup request to providers Lookups []string // filters are the lookups equivalents for matching local peers Filters []LookupFilter }
LookupOptions
func ParseLookupOptions ¶
func ParseLookupOptions(opts ...LookupOption) *LookupOptions
func (LookupOptions) Match ¶
func (l LookupOptions) Match(p *hyperspace.Announcement) bool
type Resolver ¶
type Resolver interface { Lookup( ctx context.Context, opts ...LookupOption, ) ([]*peer.ConnectionInfo, error) LookupPeer( ctx context.Context, publicKey crypto.PublicKey, ) (*peer.ConnectionInfo, error) }
type TildeDigestSyncList ¶ added in v0.19.0
type TildeDigestSyncList struct {
// contains filtered or unexported fields
}
TildeDigestSyncList -
func (*TildeDigestSyncList) Delete ¶ added in v0.19.0
func (m *TildeDigestSyncList) Delete(k tilde.Digest)
Delete -
func (*TildeDigestSyncList) Exists ¶ added in v0.19.0
func (m *TildeDigestSyncList) Exists(k tilde.Digest) bool
Exists -
func (*TildeDigestSyncList) List ¶ added in v0.19.0
func (m *TildeDigestSyncList) List() []tilde.Digest
List -
func (*TildeDigestSyncList) Put ¶ added in v0.19.0
func (m *TildeDigestSyncList) Put(k tilde.Digest)
Put -
Click to show internal directories.
Click to hide internal directories.