Documentation ¶
Index ¶
- Constants
- Variables
- func Cpu() string
- func Disk() string
- func GetPublicIP() (net.IP, error)
- func GetResolveIP() (net.IP, error)
- func GetResolveIPV2() (net.IP, error)
- func IPEqualSelf(ip string) string
- func Info() string
- func IsPublicIP(IP net.IP) bool
- func Mem() string
- func PublicIPValid() bool
- func Quit()
- func Run()
- func SelfPubIP() string
- type Chan
- type Event
- type IPType
- type MemInfo
Constants ¶
View Source
const ( IptUnk = IPType(0) IptPub = IPType(1) IptPriA = IPType(2) IptPriB = IPType(3) IptPriC = IPType(4) )
View Source
const GB = 1024 * 1024 * 1024
Variables ¶
View Source
var ( ResolveIp = net.IP{} PublicIp = net.IP{} )
Functions ¶
func GetPublicIP ¶ added in v0.5.39
func GetResolveIP ¶ added in v0.5.39
func GetResolveIPV2 ¶ added in v0.5.39
func IPEqualSelf ¶
func IsPublicIP ¶
func PublicIPValid ¶ added in v0.7.0
func PublicIPValid() bool
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event represents a one-time event that may occur in the future.
func (*Event) Done ¶
func (e *Event) Done() <-chan struct{}
Done returns a channel that will be closed when Fire is called.
type MemInfo ¶ added in v1.0.0
type MemInfo struct { // Total amount of RAM on this system Total uint64 `json:"total"` // RAM available for programs to allocate // // This value is computed from the kernel specific values. Available uint64 `json:"available"` // RAM used by programs // // This value is computed from the kernel specific values. Used uint64 `json:"used"` // Percentage of RAM used by programs // // This value is computed from the kernel specific values. UsedPercent float64 `json:"usedPercent"` }
Click to show internal directories.
Click to hide internal directories.