Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoResolver = errors.New("No resover for domain.")
ErrNoResolver signals no resolver exists for the specified domain.
View Source
var ErrResolveFailed = errors.New("Could not resolve name.")
ErrResolveFailed signals an error when attempting to resolve.
Functions ¶
This section is empty.
Types ¶
type DNSResolver ¶
type DNSResolver struct {
// contains filtered or unexported fields
}
DNSResolver implements a Resolver on DNS domains
type LookupTXTFunc ¶
type NameSystem ¶
type NameSystem struct {
// contains filtered or unexported fields
}
func NewNameSystem ¶
func NewNameSystem(resolvers []Resolver) (*NameSystem, error)
type Resolver ¶
type Resolver interface { // Resolve a domain name into a PeerIDs Resolve(ctx context.Context, name string) (peer.ID, error) // Returns a list of domains this resolver knows how to resolve Domains() []string }
A Resolver will resolve domain names into PeerIDs that can then been used in IPNS queries. OpenBazaar is intended to be agnostic to the underlying name systems as they all have their own postives and negatives. New name systems can be added by implementing the Resolver interface although only nodes which are updated with the new Resolver will be able to visit such domains.
func NewDNSResolver ¶
func NewDNSResolver() Resolver
NewDNSResolver constructs a name resolver using DNS TXT records.
Click to show internal directories.
Click to hide internal directories.