mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
controlclient,tailcfg,types: expose MaxKeyDuration via localapi (#10401)
Updates tailscale/corp#16016 Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:

committed by
GitHub

parent
d9aeb30281
commit
124dc10261
@@ -75,6 +75,9 @@ type NetworkMap struct {
|
||||
DomainAuditLogID string
|
||||
|
||||
UserProfiles map[tailcfg.UserID]tailcfg.UserProfile
|
||||
|
||||
// MaxKeyDuration describes the MaxKeyDuration setting for the tailnet.
|
||||
MaxKeyDuration time.Duration
|
||||
}
|
||||
|
||||
// User returns nm.SelfNode.User if nm.SelfNode is non-nil, otherwise it returns
|
||||
|
@@ -177,5 +177,6 @@ func mapResponseContainsNonPatchFields(res *tailcfg.MapResponse) bool {
|
||||
// function is called, so it should never be set anyway. But for
|
||||
// completedness, and for tests, check it too:
|
||||
res.PeersChanged != nil ||
|
||||
res.DefaultAutoUpdate != ""
|
||||
res.DefaultAutoUpdate != "" ||
|
||||
res.MaxKeyDuration > 0
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ func TestMapResponseContainsNonPatchFields(t *testing.T) {
|
||||
}
|
||||
return reflect.ValueOf("foo").Convert(t)
|
||||
case reflect.Int64:
|
||||
return reflect.ValueOf(int64(1))
|
||||
return reflect.ValueOf(int64(1)).Convert(t)
|
||||
case reflect.Slice:
|
||||
return reflect.MakeSlice(t, 1, 1)
|
||||
case reflect.Ptr:
|
||||
|
Reference in New Issue
Block a user