backend

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package backend : 裏方の処理

Index

Constants

This section is empty.

Variables

View Source
var MonitorDataes []*MonitorDataEnt

MonitorDataes : モニターデータ

Functions

func DeleteAIResult

func DeleteAIResult(id string) error

func GetPortList

func GetPortList(n *datastore.NodeEnt) ([]*PortEnt, []*PortEnt)

func GetVPanelPowerInfo

func GetVPanelPowerInfo(id string) bool

GetVPanelPowerInfo : パネルの電源状態を取得

func IsLatest

func IsLatest() bool

func MakeAIData

func MakeAIData(req *AIReq) error

func Start

func Start(ctx context.Context, dsp, vn string, wg *sync.WaitGroup) error

Types

type AIReq

type AIReq struct {
	PollingID string
	TimeStamp []int64
	Data      [][]float64
}

type HostResourceEnt

type HostResourceEnt struct {
	System     []*HrSystem     `json:"System"`
	Storage    []*HrStorage    `json:"Storage"`
	Device     []*HrDevice     `json:"Device"`
	FileSystem []*HrFileSystem `json:"FileSystem"`
	Process    []*HrProcess    `json:"Process"`
}

func GetHostResource

func GetHostResource(n *datastore.NodeEnt) *HostResourceEnt

type HrDevice

type HrDevice struct {
	Index  string `json:"Index"`
	Type   string `json:"Type"`
	Descr  string `json:"Descr"`
	Status string `json:"Status"`
	Errors string `json:"Errors"`
}

type HrFileSystem

type HrFileSystem struct {
	Index    string `json:"Index"`
	Type     string `json:"Type"`
	Mount    string `json:"Mount"`
	Remote   string `json:"Remote"`
	Bootable int64  `json:"Bootable"`
	Access   int64  `json:"Access"`
}

type HrProcess

type HrProcess struct {
	PID    string `json:"PID"`
	Name   string `json:"Name"`
	Type   string `json:"Type"`
	Status string `json:"Status"`
	Path   string `json:"Path"`
	Param  string `json:"Param"`
	CPU    int64  `json:"CPU"`
	Mem    int64  `json:"Mem"`
}

type HrStorage

type HrStorage struct {
	Index string  `json:"Index"`
	Type  string  `json:"Type"`
	Descr string  `json:"Descr"`
	Size  int64   `json:"Size"`
	Used  int64   `json:"Used"`
	Unit  int64   `json:"Unit"`
	Rate  float64 `json:"Rate"`
}

type HrSystem

type HrSystem struct {
	Index int    `json:"Index"`
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

type MonitorDataEnt

type MonitorDataEnt struct {
	Time   int64   `json:"Time"`
	CPU    float64 `json:"CPU"`
	Mem    float64 `json:"Mem"`
	Disk   float64 `json:"Disk"`
	Load   float64 `json:"Load"`
	Bytes  float64 `json:"Bytes"`
	Net    float64 `json:"Net"`
	Conn   int     `json:"Conn"`
	Proc   int     `json:"Proc"`
	DBSize int64   `json:"DBSize"`
}

MonitorDataEnt :

type PortEnt

type PortEnt struct {
	Port    int
	Address string
	Process string
	Descr   string
}

type RMONEnt

type RMONEnt struct {
	ProtocolDir map[int]string
	SysUptime   int64
	LocalTime   int64
	MIBs        map[string]map[string]string
}

type VPanelPortEnt

type VPanelPortEnt struct {
	Index      int64  `json:"Index"`
	State      string `json:"State"`
	Name       string `json:"Name"`
	Speed      int64  `json:"Speed"`
	OutPacktes int64  `json:"OutPacktes"`
	OutBytes   int64  `json:"OutBytes"`
	OutError   int64  `json:"OutError"`
	InPacktes  int64  `json:"InPacktes"`
	InBytes    int64  `json:"InBytes"`
	InError    int64  `json:"InError"`
	Type       int64  `json:"Type"`
	Admin      int64  `json:"Admin"`
	Oper       int64  `json:"Oper"`
	MAC        string `json:"MAC"`
	// contains filtered or unexported fields
}

func GetVPanelPorts

func GetVPanelPorts(id string) []VPanelPortEnt

GetVPanelPorts : パネルに表示するポートの情報を取得する 優先順位は 1.ポーリングの設定 2.SNMPから取得 3.ラインの設定

Jump to

Keyboard shortcuts

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