server

package
v0.0.0-...-0c34cbd Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NamespaceSplit = "::"

Variables

View Source
var ErrAppNotClassified = fmt.Errorf("尚未对App分类")
View Source
var ErrAppNotFound = fmt.Errorf("不存在本应用")

Functions

This section is empty.

Types

type API

type API interface {
	QueryAppCharacteristics(appName AppName) (*AppCharacteristics, error)

	ReCluster()
}

type AppCharacteristics

type AppCharacteristics struct {
	AppName `json:",inline"`

	SectionData []*core.SectionData `json:"sectionData"`
}

type AppClass

type AppClass struct {
	AppName
	ClassId uint
	CpuMax  float32 // 本应用CPU最大值。由于类数据是标准化后的数据,无法得知实际使用了多少CPU。CPU最大值代表类数据为1的时候的实际使用量
	MemMax  float32 // 本应用内存最大值
}

type AppName

type AppName struct {
	Name      string `gorm:"uniqueIndex:app;type:VARCHAR(256)"`
	Namespace string `gorm:"uniqueIndex:app;type:VARCHAR(256)"`
}

func AppNameFromContainerId

func AppNameFromContainerId(containerId string) AppName

func (AppName) ContainerId

func (name AppName) ContainerId() string

type AppPodMetrics

type AppPodMetrics struct {
	AppName
	Timestamp uint64  `gorm:"uniqueIndex:record"`
	Cpu       float32 `gorm:"not null;precision:2"`
	Mem       float32 `gorm:"not null:precision:2"`
}

type ClassMetrics

type ClassMetrics struct {
	ClassId uint                `json:"classId"`
	Data    []*core.SectionData `json:"data"`
}

Jump to

Keyboard shortcuts

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