| 1234567891011121314151617181920212223242526 |
- package modelse
- import (
- "sync"
- )
- type NodeInfoT struct {
- Hostname string `json:"hostname"`
- HostIp string `json:"host_ip"`
- KernelVersion string `json:"kernel_version"`
- SystemUUID string `json:"system_uuid"`
- HostID int64 `json:"host_id"`
- AccountID int `json:"account_id"`
- LicenseKey string `json:"license_key"`
- Lock sync.RWMutex `json:"lock,omitempty"`
- }
- type NodeInfoInterface interface {
- GetNodeInfo() *NodeInfoT
- }
- func (n *NodeInfoT) GetNodeInfo() *NodeInfoT {
- n.Lock.Lock()
- defer n.Lock.Unlock()
- return n
- }
|