readd the resolver

This commit is contained in:
Asim Aslam
2019-07-28 12:14:40 +01:00
parent 2b3a87a212
commit adb6760e21
4 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// Package resolver resolves network ids to addresses
package resolver
// Resolver is network resolver. It's used to find network nodes
// via id to connect to. This is done based on Network.Id().
// Before we can be part of any network, we have to connect to it.
type Resolver interface {
// Resolve returns a list of addresses for an id
Resolve(id string) ([]*Record, error)
}
// A resolved record
type Record struct {
Address string `json:"address"`
}