add comment to types with importing proxmoxaas-common-lib types
This commit is contained in:
@@ -7,6 +7,11 @@ import (
|
|||||||
"github.com/luthermonson/go-proxmox"
|
"github.com/luthermonson/go-proxmox"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// uses and aliases common resource types from proxmoxaas-common-lib
|
||||||
|
// except for Cluster, Node, and Instance which require mutex locks and additional fields
|
||||||
|
|
||||||
|
// add mutex and pve client
|
||||||
|
// override Nodes map to new custom Node type
|
||||||
type Cluster struct {
|
type Cluster struct {
|
||||||
paas.Cluster
|
paas.Cluster
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
@@ -14,6 +19,8 @@ type Cluster struct {
|
|||||||
Nodes map[string]*Node `json:"nodes"`
|
Nodes map[string]*Node `json:"nodes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add mutex and pve api Node object
|
||||||
|
// override Instances map to bew custom Instance type
|
||||||
type Node struct {
|
type Node struct {
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
paas.Node
|
paas.Node
|
||||||
@@ -27,6 +34,7 @@ type InstanceType = paas.InstanceType
|
|||||||
const VM InstanceType = paas.VM
|
const VM InstanceType = paas.VM
|
||||||
const CT InstanceType = paas.CT
|
const CT InstanceType = paas.CT
|
||||||
|
|
||||||
|
// add mutex and various config objects
|
||||||
type Instance struct {
|
type Instance struct {
|
||||||
lock sync.Mutex
|
lock sync.Mutex
|
||||||
paas.Instance
|
paas.Instance
|
||||||
|
|||||||
Reference in New Issue
Block a user