micro/resolver/resolver.go
Vasiliy Tolstov f62b26eda3
Some checks failed
pr / test (pull_request) Failing after 1m30s
lint / lint (pull_request) Successful in 10m37s
fixup interfaces
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-03-06 18:45:32 +03:00

17 lines
512 B
Go

// Package resolver resolves network names to addresses
package 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"`
}