go-micro: github.com/micro/go-micro/network/resolver Index | Files | Directories

package resolver

import "github.com/micro/go-micro/network/resolver"

Package resolver resolves network names to addresses


Package Files


type Record Uses

type Record struct {
    Address  string `json:"address"`
    Priority int64  `json:"priority"`

A resolved record

type Resolver Uses

type Resolver interface {
    // Resolve returns a list of addresses for a name
    Resolve(name string) ([]*Record, error)

Resolver is network resolver. It's used to find network nodes via the name to connect to. This is done based on Network.Name(). Before we can be part of any network, we have to connect to it.


dnsPackage dns resolves names to dns records
dnssrvPackage dns srv resolves names to dns srv records
httpPackage http resolves names to network addresses using a http request
registryPackage registry resolves names using the go-micro registry
staticPackage static is a static resolver

Package resolver is imported by 24 packages. Updated 2020-01-30. Refresh now. Tools for package owners.