Documentation ¶
Index ¶
- Variables
- func GetCPULoad(s *HealthInfo)
- func GetHardwareData(w http.ResponseWriter)
- type HealthInfo
- func (*HealthInfo) Descriptor() ([]byte, []int)
- func (m *HealthInfo) GetAvailableMemory() uint64
- func (m *HealthInfo) GetCpuLoad1() float64
- func (m *HealthInfo) GetCpuLoad15() float64
- func (m *HealthInfo) GetCpuLoad5() float64
- func (m *HealthInfo) GetTotalMemory() uint64
- func (*HealthInfo) ProtoMessage()
- func (m *HealthInfo) Reset()
- func (m *HealthInfo) String() string
- func (m *HealthInfo) XXX_DiscardUnknown()
- func (m *HealthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HealthInfo) XXX_Merge(src proto.Message)
- func (m *HealthInfo) XXX_Size() int
- func (m *HealthInfo) XXX_Unmarshal(b []byte) error
- type HostInfo
- func (*HostInfo) Descriptor() ([]byte, []int)
- func (m *HostInfo) GetFileSystems() []*PartitionInfo
- func (m *HostInfo) GetHostName() string
- func (m *HostInfo) GetNumCores() uint32
- func (m *HostInfo) GetOsName() string
- func (m *HostInfo) GetOsVersion() string
- func (*HostInfo) ProtoMessage()
- func (m *HostInfo) Reset()
- func (m *HostInfo) String() string
- func (m *HostInfo) XXX_DiscardUnknown()
- func (m *HostInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HostInfo) XXX_Merge(src proto.Message)
- func (m *HostInfo) XXX_Size() int
- func (m *HostInfo) XXX_Unmarshal(b []byte) error
- type IpAddress
- func (*IpAddress) Descriptor() ([]byte, []int)
- func (m *IpAddress) GetAddress() string
- func (m *IpAddress) GetType() IpAddressType
- func (*IpAddress) ProtoMessage()
- func (m *IpAddress) Reset()
- func (m *IpAddress) String() string
- func (m *IpAddress) XXX_DiscardUnknown()
- func (m *IpAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IpAddress) XXX_Merge(src proto.Message)
- func (m *IpAddress) XXX_Size() int
- func (m *IpAddress) XXX_Unmarshal(b []byte) error
- type IpAddressType
- type NetworkInterfaceData
- func (*NetworkInterfaceData) Descriptor() ([]byte, []int)
- func (m *NetworkInterfaceData) GetAddress() []*IpAddress
- func (m *NetworkInterfaceData) GetDeviceName() string
- func (m *NetworkInterfaceData) GetHwAddr() string
- func (m *NetworkInterfaceData) GetMtu() uint32
- func (m *NetworkInterfaceData) GetName() string
- func (m *NetworkInterfaceData) GetType() NetworkInterfaceType
- func (*NetworkInterfaceData) ProtoMessage()
- func (m *NetworkInterfaceData) Reset()
- func (m *NetworkInterfaceData) String() string
- func (m *NetworkInterfaceData) XXX_DiscardUnknown()
- func (m *NetworkInterfaceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NetworkInterfaceData) XXX_Merge(src proto.Message)
- func (m *NetworkInterfaceData) XXX_Size() int
- func (m *NetworkInterfaceData) XXX_Unmarshal(b []byte) error
- type NetworkInterfaceType
- type PartitionInfo
- func (*PartitionInfo) Descriptor() ([]byte, []int)
- func (m *PartitionInfo) GetDevice() string
- func (m *PartitionInfo) GetFree() uint64
- func (m *PartitionInfo) GetFsType() string
- func (m *PartitionInfo) GetMountPath() string
- func (m *PartitionInfo) GetSize() uint64
- func (*PartitionInfo) ProtoMessage()
- func (m *PartitionInfo) Reset()
- func (m *PartitionInfo) String() string
- func (m *PartitionInfo) XXX_DiscardUnknown()
- func (m *PartitionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PartitionInfo) XXX_Merge(src proto.Message)
- func (m *PartitionInfo) XXX_Size() int
- func (m *PartitionInfo) XXX_Unmarshal(b []byte) error
- type ProcessDetails
- func (*ProcessDetails) Descriptor() ([]byte, []int)
- func (m *ProcessDetails) GetPath() string
- func (m *ProcessDetails) GetProcessId() uint64
- func (*ProcessDetails) ProtoMessage()
- func (m *ProcessDetails) Reset()
- func (m *ProcessDetails) String() string
- func (m *ProcessDetails) XXX_DiscardUnknown()
- func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProcessDetails) XXX_Merge(src proto.Message)
- func (m *ProcessDetails) XXX_Size() int
- func (m *ProcessDetails) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var IpAddressType_name = map[int32]string{
0: "UNKNOWN_IPADDR_TYPE",
1: "IPv4",
2: "IPv6",
}
View Source
var IpAddressType_value = map[string]int32{
"UNKNOWN_IPADDR_TYPE": 0,
"IPv4": 1,
"IPv6": 2,
}
View Source
var NetworkInterfaceType_name = map[int32]string{
0: "UNKNOWN",
1: "ETHERNET",
2: "WIRELESS",
}
View Source
var NetworkInterfaceType_value = map[string]int32{
"UNKNOWN": 0,
"ETHERNET": 1,
"WIRELESS": 2,
}
Functions ¶
func GetCPULoad ¶
func GetCPULoad(s *HealthInfo)
GetCPULoad will analyze the cpu load of this node and write the data into the given LocalDataDto.
func GetHardwareData ¶
func GetHardwareData(w http.ResponseWriter)
GetHardwareData writes some statistics about this hardware into the given http response writer.
Types ¶
type HealthInfo ¶
type HealthInfo struct { TotalMemory uint64 `protobuf:"varint,1,opt,name=totalMemory,proto3" json:"totalMemory,omitempty"` AvailableMemory uint64 `protobuf:"varint,2,opt,name=availableMemory,proto3" json:"availableMemory,omitempty"` CpuLoad1 float64 `protobuf:"fixed64,3,opt,name=cpuLoad1,proto3" json:"cpuLoad1,omitempty"` CpuLoad5 float64 `protobuf:"fixed64,4,opt,name=cpuLoad5,proto3" json:"cpuLoad5,omitempty"` CpuLoad15 float64 `protobuf:"fixed64,5,opt,name=cpuLoad15,proto3" json:"cpuLoad15,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GetNodeDetails ¶
func GetNodeDetails() (data HealthInfo, err error)
GetNodeDetails returns all currently known information about this node.
func (*HealthInfo) Descriptor ¶
func (*HealthInfo) Descriptor() ([]byte, []int)
func (*HealthInfo) GetAvailableMemory ¶
func (m *HealthInfo) GetAvailableMemory() uint64
func (*HealthInfo) GetCpuLoad1 ¶
func (m *HealthInfo) GetCpuLoad1() float64
func (*HealthInfo) GetCpuLoad15 ¶
func (m *HealthInfo) GetCpuLoad15() float64
func (*HealthInfo) GetCpuLoad5 ¶
func (m *HealthInfo) GetCpuLoad5() float64
func (*HealthInfo) GetTotalMemory ¶
func (m *HealthInfo) GetTotalMemory() uint64
func (*HealthInfo) ProtoMessage ¶
func (*HealthInfo) ProtoMessage()
func (*HealthInfo) Reset ¶
func (m *HealthInfo) Reset()
func (*HealthInfo) String ¶
func (m *HealthInfo) String() string
func (*HealthInfo) XXX_DiscardUnknown ¶
func (m *HealthInfo) XXX_DiscardUnknown()
func (*HealthInfo) XXX_Marshal ¶
func (m *HealthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HealthInfo) XXX_Merge ¶
func (m *HealthInfo) XXX_Merge(src proto.Message)
func (*HealthInfo) XXX_Size ¶
func (m *HealthInfo) XXX_Size() int
func (*HealthInfo) XXX_Unmarshal ¶
func (m *HealthInfo) XXX_Unmarshal(b []byte) error
type HostInfo ¶
type HostInfo struct { HostName string `protobuf:"bytes,1,opt,name=HostName,proto3" json:"HostName,omitempty"` OsName string `protobuf:"bytes,2,opt,name=osName,proto3" json:"osName,omitempty"` OsVersion string `protobuf:"bytes,3,opt,name=osVersion,proto3" json:"osVersion,omitempty"` NumCores uint32 `protobuf:"varint,4,opt,name=numCores,proto3" json:"numCores,omitempty"` FileSystems []*PartitionInfo `protobuf:"bytes,5,rep,name=fileSystems,proto3" json:"fileSystems,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GetHostInfo ¶
func GetHostInfo() (hostInfo HostInfo)
func (*HostInfo) Descriptor ¶
func (*HostInfo) GetFileSystems ¶
func (m *HostInfo) GetFileSystems() []*PartitionInfo
func (*HostInfo) GetHostName ¶
func (*HostInfo) GetNumCores ¶
func (*HostInfo) GetOsVersion ¶
func (*HostInfo) ProtoMessage ¶
func (*HostInfo) ProtoMessage()
func (*HostInfo) XXX_DiscardUnknown ¶
func (m *HostInfo) XXX_DiscardUnknown()
func (*HostInfo) XXX_Marshal ¶
func (*HostInfo) XXX_Unmarshal ¶
type IpAddress ¶ added in v1.1.0
type IpAddress struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Type IpAddressType `protobuf:"varint,2,opt,name=type,proto3,enum=sysinfo.IpAddressType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IpAddress) Descriptor ¶ added in v1.1.0
func (*IpAddress) GetAddress ¶ added in v1.1.0
func (*IpAddress) GetType ¶ added in v1.1.0
func (m *IpAddress) GetType() IpAddressType
func (*IpAddress) ProtoMessage ¶ added in v1.1.0
func (*IpAddress) ProtoMessage()
func (*IpAddress) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *IpAddress) XXX_DiscardUnknown()
func (*IpAddress) XXX_Marshal ¶ added in v1.1.0
func (*IpAddress) XXX_Unmarshal ¶ added in v1.1.0
type IpAddressType ¶ added in v1.1.0
type IpAddressType int32
const ( IpAddressType_UNKNOWN_IPADDR_TYPE IpAddressType = 0 IpAddressType_IPv4 IpAddressType = 1 IpAddressType_IPv6 IpAddressType = 2 )
func (IpAddressType) EnumDescriptor ¶ added in v1.1.0
func (IpAddressType) EnumDescriptor() ([]byte, []int)
func (IpAddressType) String ¶ added in v1.1.0
func (x IpAddressType) String() string
type NetworkInterfaceData ¶ added in v1.1.0
type NetworkInterfaceData struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` DeviceName string `protobuf:"bytes,2,opt,name=deviceName,proto3" json:"deviceName,omitempty"` Type NetworkInterfaceType `protobuf:"varint,3,opt,name=type,proto3,enum=sysinfo.NetworkInterfaceType" json:"type,omitempty"` HwAddr string `protobuf:"bytes,4,opt,name=hwAddr,proto3" json:"hwAddr,omitempty"` Mtu uint32 `protobuf:"varint,5,opt,name=mtu,proto3" json:"mtu,omitempty"` Address []*IpAddress `protobuf:"bytes,6,rep,name=address,proto3" json:"address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GetLocalNetworkInterfaces ¶ added in v1.1.0
func GetLocalNetworkInterfaces() ([]NetworkInterfaceData, error)
GetLocalNetworkInterfaces returns all known local network interfaces
func (*NetworkInterfaceData) Descriptor ¶ added in v1.1.0
func (*NetworkInterfaceData) Descriptor() ([]byte, []int)
func (*NetworkInterfaceData) GetAddress ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetAddress() []*IpAddress
func (*NetworkInterfaceData) GetDeviceName ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetDeviceName() string
func (*NetworkInterfaceData) GetHwAddr ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetHwAddr() string
func (*NetworkInterfaceData) GetMtu ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetMtu() uint32
func (*NetworkInterfaceData) GetName ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetName() string
func (*NetworkInterfaceData) GetType ¶ added in v1.1.0
func (m *NetworkInterfaceData) GetType() NetworkInterfaceType
func (*NetworkInterfaceData) ProtoMessage ¶ added in v1.1.0
func (*NetworkInterfaceData) ProtoMessage()
func (*NetworkInterfaceData) Reset ¶ added in v1.1.0
func (m *NetworkInterfaceData) Reset()
func (*NetworkInterfaceData) String ¶ added in v1.1.0
func (m *NetworkInterfaceData) String() string
func (*NetworkInterfaceData) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *NetworkInterfaceData) XXX_DiscardUnknown()
func (*NetworkInterfaceData) XXX_Marshal ¶ added in v1.1.0
func (m *NetworkInterfaceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NetworkInterfaceData) XXX_Merge ¶ added in v1.1.0
func (m *NetworkInterfaceData) XXX_Merge(src proto.Message)
func (*NetworkInterfaceData) XXX_Size ¶ added in v1.1.0
func (m *NetworkInterfaceData) XXX_Size() int
func (*NetworkInterfaceData) XXX_Unmarshal ¶ added in v1.1.0
func (m *NetworkInterfaceData) XXX_Unmarshal(b []byte) error
type NetworkInterfaceType ¶ added in v1.1.0
type NetworkInterfaceType int32
const ( NetworkInterfaceType_UNKNOWN NetworkInterfaceType = 0 NetworkInterfaceType_ETHERNET NetworkInterfaceType = 1 NetworkInterfaceType_WIRELESS NetworkInterfaceType = 2 )
func (NetworkInterfaceType) EnumDescriptor ¶ added in v1.1.0
func (NetworkInterfaceType) EnumDescriptor() ([]byte, []int)
func (NetworkInterfaceType) String ¶ added in v1.1.0
func (x NetworkInterfaceType) String() string
type PartitionInfo ¶
type PartitionInfo struct { MountPath string `protobuf:"bytes,1,opt,name=MountPath,proto3" json:"MountPath,omitempty"` Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Free uint64 `protobuf:"varint,3,opt,name=free,proto3" json:"free,omitempty"` FsType string `protobuf:"bytes,4,opt,name=fsType,proto3" json:"fsType,omitempty"` Device string `protobuf:"bytes,5,opt,name=device,proto3" json:"device,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func GetDiskSizeInfo ¶
func GetDiskSizeInfo(thisPath string) (disk PartitionInfo, err error)
GetDiskSizeInfo returns the disk info for a given linux path
func (*PartitionInfo) Descriptor ¶
func (*PartitionInfo) Descriptor() ([]byte, []int)
func (*PartitionInfo) GetDevice ¶
func (m *PartitionInfo) GetDevice() string
func (*PartitionInfo) GetFree ¶
func (m *PartitionInfo) GetFree() uint64
func (*PartitionInfo) GetFsType ¶
func (m *PartitionInfo) GetFsType() string
func (*PartitionInfo) GetMountPath ¶
func (m *PartitionInfo) GetMountPath() string
func (*PartitionInfo) GetSize ¶
func (m *PartitionInfo) GetSize() uint64
func (*PartitionInfo) ProtoMessage ¶
func (*PartitionInfo) ProtoMessage()
func (*PartitionInfo) Reset ¶
func (m *PartitionInfo) Reset()
func (*PartitionInfo) String ¶
func (m *PartitionInfo) String() string
func (*PartitionInfo) XXX_DiscardUnknown ¶
func (m *PartitionInfo) XXX_DiscardUnknown()
func (*PartitionInfo) XXX_Marshal ¶
func (m *PartitionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PartitionInfo) XXX_Merge ¶
func (m *PartitionInfo) XXX_Merge(src proto.Message)
func (*PartitionInfo) XXX_Size ¶
func (m *PartitionInfo) XXX_Size() int
func (*PartitionInfo) XXX_Unmarshal ¶
func (m *PartitionInfo) XXX_Unmarshal(b []byte) error
type ProcessDetails ¶ added in v1.1.0
type ProcessDetails struct { ProcessId uint64 `protobuf:"varint,1,opt,name=processId,proto3" json:"processId,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ProcessDetails) Descriptor ¶ added in v1.1.0
func (*ProcessDetails) Descriptor() ([]byte, []int)
func (*ProcessDetails) GetPath ¶ added in v1.1.0
func (m *ProcessDetails) GetPath() string
func (*ProcessDetails) GetProcessId ¶ added in v1.1.0
func (m *ProcessDetails) GetProcessId() uint64
func (*ProcessDetails) ProtoMessage ¶ added in v1.1.0
func (*ProcessDetails) ProtoMessage()
func (*ProcessDetails) Reset ¶ added in v1.1.0
func (m *ProcessDetails) Reset()
func (*ProcessDetails) String ¶ added in v1.1.0
func (m *ProcessDetails) String() string
func (*ProcessDetails) XXX_DiscardUnknown ¶ added in v1.1.0
func (m *ProcessDetails) XXX_DiscardUnknown()
func (*ProcessDetails) XXX_Marshal ¶ added in v1.1.0
func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProcessDetails) XXX_Merge ¶ added in v1.1.0
func (m *ProcessDetails) XXX_Merge(src proto.Message)
func (*ProcessDetails) XXX_Size ¶ added in v1.1.0
func (m *ProcessDetails) XXX_Size() int
func (*ProcessDetails) XXX_Unmarshal ¶ added in v1.1.0
func (m *ProcessDetails) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.