micro/network/resolver/resolver.go

13 lines
267 B
Go
Raw Normal View History

2019-06-24 17:11:11 +03:00
// Package resolver resolves network ids to addresses
package resolver
type Resolver interface {
// Resolve returns a list of addresses for an id
Resolve(id string) ([]*Record, error)
}
2019-06-24 17:22:12 +03:00
// A resolved record
2019-06-24 17:11:11 +03:00
type Record struct {
2019-06-24 17:21:24 +03:00
Address string `json:"address"`
2019-06-24 17:11:11 +03:00
}