|
|
@ -20,6 +20,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
"tailscale.com/types/key"
|
|
|
|
"tailscale.com/types/key"
|
|
|
|
|
|
|
|
"tailscale.com/types/ptr"
|
|
|
|
"tailscale.com/types/views"
|
|
|
|
"tailscale.com/types/views"
|
|
|
|
"tailscale.com/util/dnsname"
|
|
|
|
"tailscale.com/util/dnsname"
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -251,6 +252,10 @@ type PeerStatus struct {
|
|
|
|
// information from control or optimisically set on the client if the
|
|
|
|
// information from control or optimisically set on the client if the
|
|
|
|
// expiration time has passed.
|
|
|
|
// expiration time has passed.
|
|
|
|
Expired bool `json:",omitempty"`
|
|
|
|
Expired bool `json:",omitempty"`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// KeyExpiry, if present, is the time at which the node key expired or
|
|
|
|
|
|
|
|
// will expire.
|
|
|
|
|
|
|
|
KeyExpiry *time.Time `json:",omitempty"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type StatusBuilder struct {
|
|
|
|
type StatusBuilder struct {
|
|
|
@ -435,6 +440,9 @@ func (sb *StatusBuilder) AddPeer(peer key.NodePublic, st *PeerStatus) {
|
|
|
|
if st.Expired {
|
|
|
|
if st.Expired {
|
|
|
|
e.Expired = true
|
|
|
|
e.Expired = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if t := st.KeyExpiry; t != nil {
|
|
|
|
|
|
|
|
e.KeyExpiry = ptr.To(*t)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type StatusUpdater interface {
|
|
|
|
type StatusUpdater interface {
|
|
|
|