-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package api | ||
|
||
type ClusterJoinConfig struct { | ||
ConfigDigest string `json:"config_digest"` | ||
NodeList []ClusterNodeConfig `json:"nodelist"` | ||
PreferredNode string `json:"preferred_node"` | ||
Totem Totem `json:"totem"` | ||
} | ||
|
||
type ClusterNodeConfig struct { | ||
Name string `json:"name"` | ||
NodeID string `json:"nodeid"` | ||
PVEAddr string `json:"pve_addr"` | ||
PVEFP string `json:"pve_fp"` | ||
QuorumVotes string `json:"quorum_votes"` | ||
Ring0Addr string `json:"ring0_addr"` | ||
} | ||
|
||
type Totem struct { | ||
ClusterName string `json:"cluster_name"` | ||
ConfigVersion string `json:"config_version"` | ||
Interface interface{} `json:"interface"` | ||
IPVersion string `json:"ip_version"` | ||
LinkMode string `json:"link_mode"` | ||
SecAuth string `json:"secauth"` | ||
Version string `json:"version"` | ||
} | ||
|
||
type CorosyncLink struct { | ||
Link0 string `json:"link0"` | ||
Link1 string `json:"link1"` | ||
Link2 string `json:"link2"` | ||
Link3 string `json:"link3"` | ||
Link4 string `json:"link4"` | ||
Link5 string `json:"link5"` | ||
Link6 string `json:"link6"` | ||
Link7 string `json:"link7"` | ||
Link8 string `json:"link8"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package proxmox | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/sp-yduck/proxmox-go/api" | ||
) | ||
|
||
func (s *Service) NextID(ctx context.Context) (int, error) { | ||
return s.restclient.GetNextID(ctx) | ||
} | ||
|
||
func (s *Service) JoinConfig(ctx context.Context) (*api.ClusterJoinConfig, error) { | ||
return s.restclient.GetJoinConfig(ctx) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters