github.com/annwntech/go-micro/v2@v2.9.5/network/resolver/resolver.go (about)

     1  // Package resolver resolves network names to addresses
     2  package resolver
     3  
     4  // Resolver is network resolver. It's used to find network nodes
     5  // via the name to connect to. This is done based on Network.Name().
     6  // Before we can be part of any network, we have to connect to it.
     7  type Resolver interface {
     8  	// Resolve returns a list of addresses for a name
     9  	Resolve(name string) ([]*Record, error)
    10  }
    11  
    12  // A resolved record
    13  type Record struct {
    14  	Address  string `json:"address"`
    15  	Priority int64  `json:"priority"`
    16  }