feat(dns): configure and store public IP when adding new machine

This commit is contained in:
Pavel Sviderski
2025-02-26 11:16:13 +10:00
parent 35804458b0
commit 1046396edc
5 changed files with 46 additions and 13 deletions
+3 -1
View File
@@ -16,13 +16,15 @@ const (
// Token represents the machine's token for joining a cluster.
type Token struct {
PublicKey secret.Secret
PublicIP netip.Addr
Endpoints []netip.AddrPort
}
// NewToken creates a new machine token with the given public key and endpoints.
func NewToken(publicKey secret.Secret, endpoints []netip.AddrPort) Token {
func NewToken(publicKey secret.Secret, publicIP netip.Addr, endpoints []netip.AddrPort) Token {
return Token{
PublicKey: publicKey,
PublicIP: publicIP,
Endpoints: endpoints,
}
}