node.go 403 B

1234567891011121314151617181920212223242526
  1. package modelse
  2. import (
  3. "sync"
  4. )
  5. type NodeInfoT struct {
  6. Hostname string
  7. HostIp string
  8. KernelVersion string
  9. SystemUUID string
  10. HostID int64
  11. AccountID int
  12. LicenseKey string
  13. Lock sync.RWMutex
  14. }
  15. type NodeInfoInterface interface {
  16. GetNodeInfo() *NodeInfoT
  17. }
  18. func (n *NodeInfoT) GetNodeInfo() *NodeInfoT {
  19. n.Lock.Lock()
  20. defer n.Lock.Unlock()
  21. return n
  22. }