Simplify root API

This commit is contained in:
Adam Ierymenko 2019-09-26 13:35:56 -07:00
parent 7061f13b24
commit 3b3e6d2bfc
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
8 changed files with 149 additions and 299 deletions

View file

@ -18,9 +18,13 @@ type Root struct {
DNSName string
Identity *Identity
Addresses []InetAddress
Locator []byte
Preferred bool
Online bool
}
// Static returns true if this is a static root
func (r *Root) Static() bool { return len(r.DNSName) == 0 }
// Dynamic returns true if this is a dynamic root
func (r *Root) Dynamic() bool { return len(r.DNSName) > 0 }