Compare commits
2 Commits
main
...
nyghtowl/t
Author | SHA1 | Date |
---|---|---|
![]() |
0a6d75eeca | |
![]() |
70ee70b25d |
|
@ -219,6 +219,10 @@ type Node struct {
|
||||||
|
|
||||||
MachineAuthorized bool `json:",omitempty"` // TODO(crawshaw): replace with MachineStatus
|
MachineAuthorized bool `json:",omitempty"` // TODO(crawshaw): replace with MachineStatus
|
||||||
|
|
||||||
|
// Tailscale cert domain used to represent the alias applied whether by default, shared or custom.
|
||||||
|
// Combination of a TCD prefix that is default, tails-scales or custom with the ts.net public suffix.
|
||||||
|
TailnetName string `json:",omitempty"` // ??.ts.net
|
||||||
|
|
||||||
// Capabilities are capabilities that the node has.
|
// Capabilities are capabilities that the node has.
|
||||||
// They're free-form strings, but should be in the form of URLs/URIs
|
// They're free-form strings, but should be in the form of URLs/URIs
|
||||||
// such as:
|
// such as:
|
||||||
|
|
|
@ -91,6 +91,7 @@ var _NodeCloneNeedsRegeneration = Node(struct {
|
||||||
Online *bool
|
Online *bool
|
||||||
KeepAlive bool
|
KeepAlive bool
|
||||||
MachineAuthorized bool
|
MachineAuthorized bool
|
||||||
|
TailnetName string
|
||||||
Capabilities []string
|
Capabilities []string
|
||||||
ComputedName string
|
ComputedName string
|
||||||
computedHostIfDifferent string
|
computedHostIfDifferent string
|
||||||
|
|
|
@ -331,7 +331,7 @@ func TestNodeEqual(t *testing.T) {
|
||||||
"Created", "Tags", "PrimaryRoutes",
|
"Created", "Tags", "PrimaryRoutes",
|
||||||
"LastSeen", "Online", "KeepAlive", "MachineAuthorized",
|
"LastSeen", "Online", "KeepAlive", "MachineAuthorized",
|
||||||
"Capabilities",
|
"Capabilities",
|
||||||
"ComputedName", "computedHostIfDifferent", "ComputedNameWithHost",
|
"ComputedName", "computedHostIfDifferent", "ComputedNameWithHost", "TailnetName",
|
||||||
}
|
}
|
||||||
if have := fieldsOf(reflect.TypeOf(Node{})); !reflect.DeepEqual(have, nodeHandles) {
|
if have := fieldsOf(reflect.TypeOf(Node{})); !reflect.DeepEqual(have, nodeHandles) {
|
||||||
t.Errorf("Node.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
|
t.Errorf("Node.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
|
||||||
|
|
|
@ -170,6 +170,7 @@ func (v NodeView) Online() *bool {
|
||||||
|
|
||||||
func (v NodeView) KeepAlive() bool { return v.ж.KeepAlive }
|
func (v NodeView) KeepAlive() bool { return v.ж.KeepAlive }
|
||||||
func (v NodeView) MachineAuthorized() bool { return v.ж.MachineAuthorized }
|
func (v NodeView) MachineAuthorized() bool { return v.ж.MachineAuthorized }
|
||||||
|
func (v NodeView) TailnetName() string { return v.ж.TailnetName }
|
||||||
func (v NodeView) Capabilities() views.Slice[string] { return views.SliceOf(v.ж.Capabilities) }
|
func (v NodeView) Capabilities() views.Slice[string] { return views.SliceOf(v.ж.Capabilities) }
|
||||||
func (v NodeView) ComputedName() string { return v.ж.ComputedName }
|
func (v NodeView) ComputedName() string { return v.ж.ComputedName }
|
||||||
func (v NodeView) ComputedNameWithHost() string { return v.ж.ComputedNameWithHost }
|
func (v NodeView) ComputedNameWithHost() string { return v.ж.ComputedNameWithHost }
|
||||||
|
@ -199,6 +200,7 @@ var _NodeViewNeedsRegeneration = Node(struct {
|
||||||
Online *bool
|
Online *bool
|
||||||
KeepAlive bool
|
KeepAlive bool
|
||||||
MachineAuthorized bool
|
MachineAuthorized bool
|
||||||
|
TailnetName string
|
||||||
Capabilities []string
|
Capabilities []string
|
||||||
ComputedName string
|
ComputedName string
|
||||||
computedHostIfDifferent string
|
computedHostIfDifferent string
|
||||||
|
|
|
@ -575,7 +575,7 @@ func TestGetTypeHasher(t *testing.T) {
|
||||||
{
|
{
|
||||||
name: "tailcfg.Node",
|
name: "tailcfg.Node",
|
||||||
val: &tailcfg.Node{},
|
val: &tailcfg.Node{},
|
||||||
out: "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\tn\x88\xf1\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\tn\x88\xf1\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
|
out: "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\tn\x88\xf1\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\tn\x88\xf1\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|
Loading…
Reference in New Issue