mongo-driver: go.mongodb.org/mongo-driver/x/mongo/driver/dns Index | Files

package dns

import "go.mongodb.org/mongo-driver/x/mongo/driver/dns"

Index

Package Files

dns.go

Variables

var DefaultResolver = &Resolver{net.LookupSRV, net.LookupTXT}

DefaultResolver is a Resolver that uses the default Resolver from the net package.

type Resolver Uses

type Resolver struct {
    // Holds the functions to use for DNS lookups
    LookupSRV func(string, string, string) (string, []*net.SRV, error)
    LookupTXT func(string) ([]string, error)
}

Resolver resolves DNS records.

func (*Resolver) GetConnectionArgsFromTXT Uses

func (r *Resolver) GetConnectionArgsFromTXT(host string) ([]string, error)

GetConnectionArgsFromTXT gets the TXT record associated with the host and returns the connection arguments.

func (*Resolver) ParseHosts Uses

func (r *Resolver) ParseHosts(host string, stopOnErr bool) ([]string, error)

ParseHosts uses the srv string to get the hosts.

Package dns imports 5 packages (graph) and is imported by 2 packages. Updated 2019-05-17. Refresh now. Tools for package owners.