mod

package
v0.0.0-...-241a746 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IoClient

type IoClient struct {
	So socketio.Socket
}

func NewIoClient

func NewIoClient(so socketio.Socket) *IoClient

func (*IoClient) ID

func (i *IoClient) ID() string

type Node

type Node struct {
	ID       int32  `json:"id"`
	Name     string `json:"name"`
	Addr     string `json:"addr"`
	GrpcAddr string `json:"grpc_addr"`

	// Stat
	BytesTotal        int64   `json:"bytesTotal"`
	MemoryTotal       int64   `json:"memoryTotal"`
	MemoryUsed        int64   `json:"memoryUsed"`
	MemoryUsedPercent float64 `json:"memoryUsedPercent"`
	DiskUsagePercent  float64 `json:"disk_usage_percent"`
	CpuCount          int     `json:"cpu_count"`
	Load1             float64 `json:"load1"`
	Load5             float64 `json:"load5"`
	Load15            float64 `json:"load15"`
}

type NodeLoader

type NodeLoader interface {
	GetNodes() ([]Node, error)
}

type NodeStat

type NodeStat struct {
	NodeID int32 `json:"node_id"`
	Stat   cm.SystemInfo
}

type Packet

type Packet struct {
	NodeID  int32
	Message []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL