mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 06:09:17 +00:00
feat(dns): configure and store public IP when adding new machine
This commit is contained in:
1 parent
35804458b0
commit
1046396edc
5 files changed
+46
-13
No files matched your search
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user