micro/resolver/resolver.go
Vasiliy Tolstov 5eb0e56373 move all imports to own domain
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-02 19:55:07 +03:00

17 lines
558 B
Go

// Package resolver resolves network names to addresses
package resolver // import "go.unistack.org/micro/v3/resolver"
// 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.
type Resolver interface {
// Resolve returns a list of addresses for a name
Resolve(name string) ([]*Record, error)
}
// Record that resolved
type Record struct {
Address string `json:"address"`
Priority int64 `json:"priority"`
}