monitor

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeat

type Heartbeat struct {
	UUID        string
	WorkerName  string
	MachineType MACHINE_TYPE
	Ip          string
	CpuNum      int
	CpuUsage    float64
	MemNum      string
	MemUsage    float64
	TaskNum     int
	Timestamp   int64
}

TODO 丰富监听心跳的信息

func NewDefaultHeartBeat

func NewDefaultHeartBeat(machineType MACHINE_TYPE) (*Heartbeat, error)

NewSignature creates a new heartbeat signature

func NewHeartBeat

func NewHeartBeat(workerName string, machineType MACHINE_TYPE) (*Heartbeat, error)

NewSignature creates a new heartbeat signature

type MACHINE_TYPE

type MACHINE_TYPE string
const (
	MACHINERY_SERVER MACHINE_TYPE = "machinery-server" //server节点
	SPARK_CLUSTER    MACHINE_TYPE = "spark-cluster"    //spark集群
	FLINK_CLUSTER    MACHINE_TYPE = "flink-cluster"    //flink集群
	HADOOP_CLUSTER   MACHINE_TYPE = "hadoop-cluster"   //flink集群
	K8S_CLUSTER      MACHINE_TYPE = "k8s-cluster"      //k8s集群
	OTHER_CLUSTER    MACHINE_TYPE = "other-cluster"    //其他
)

TODO 丰富machine type

Jump to

Keyboard shortcuts

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