mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-07 21:59:15 +00:00
add uncloud machine token command to print machine token to add machine to cluster
This commit is contained in:
1 parent
4656bdd132
commit
945eff471b
9 files changed
+327
-42
No files matched your search
@@ -35,6 +35,11 @@ type PeerConfig struct {
|
||||
PublicKey secret.Secret
|
||||
}
|
||||
|
||||
func (c Config) IsConfigured() bool {
|
||||
return c.Subnet != (netip.Prefix{}) && c.ManagementIP != (netip.Addr{}) &&
|
||||
c.PrivateKey != nil && c.PublicKey != nil
|
||||
}
|
||||
|
||||
func (c Config) toDeviceConfig() (wgtypes.Config, error) {
|
||||
privateKey, err := wgtypes.NewKey(c.PrivateKey)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user