table

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePageNo

type ChangePageNo struct {
	Key    string `json:"key"`
	Reload bool   `json:"reload"`
}

type ChangeSort

type ChangeSort struct {
	Reload bool   `json:"reload"`
	Key    string `json:"key"`
}

type Columns

type Columns struct {
	DataIndex string `json:"dataIndex"`
	Title     string `json:"title"`
	Width     int    `json:"width"`
	Sorter    bool   `json:"sorter"`
}

type Command

type Command struct {
	Key     string       `json:"key"`
	State   CommandState `json:"state"`
	Target  string       `json:"target"`
	JumpOut bool         `json:"jumpOut"`
}

type CommandState

type CommandState struct {
	Params Params `json:"params"`
}

type CpuTable

type CpuTable struct {
	Data       map[string][]Data    `json:"data"`
	Props      Props                `json:"props"`
	Operations map[string]Operation `json:"operations"`
	Type       string               `json:"type"`
	State      State                `json:"state"`
}

type Data

type Data struct {
	Ready     string  `json:"ready"`
	Id        string  `json:"id"`
	Status    Status  `json:"status"`
	Namespace string  `json:"namespace"`
	Used      string  `json:"cpuUsed"`
	Percent   Percent `json:"cpuPercent"`
	Name      Name    `json:"name"`
	Ip        string  `json:"ip"`
	CpuLimit  string  `json:"cpuLimit"`
}

type Distribution

type Distribution struct {
	RenderType string            `json:"renderType"`
	Value      DistributionValue `json:"value"`
	Status     common.UsageStatusEnum
}

type DistributionValue

type DistributionValue struct {
	Text    string  `json:"text"`
	Percent float64 `json:"percent"`
}

type Meta

type Meta struct {
	Id         int    `json:"id,omitempty"`
	PageSize   int    `json:"pageSize,omitempty"`
	PageNo     int    `json:"pageNo,omitempty"`
	SortColumn string `json:"sorter"`
}

type Name

type Name struct {
	Operations map[string]Operation `json:"operations"`
	RenderType string               `json:"renderType"`
	Value      string               `json:"value"`
}

type Operation

type Operation struct {
	Key     string  `json:"key"`
	Command Command `json:"command"`
	Reload  bool    `json:"reload"`
}

type Params

type Params struct {
	PodId string `json:"podId"`
}

type Percent

type Percent struct {
	RenderType string `json:"renderType"`
	Value      string `json:"value"`
	Tip        string `json:"tip"`
	Status     string `json:"status"`
}

type Props

type Props struct {
	PageSizeOptions string  `json:"pageSizeOptions"`
	Columns         Columns `json:"columns"`
	RowKey          string  `json:"rowKey"`
}

type RowItem

type RowItem struct {
	Name        Name         `json:"name"`
	ID          string       `json:"id"`
	Status      Status       `json:"status"`
	Namespace   string       `json:"namespace"`
	IP          string       `json:"ip"`
	Request     string       `json:"request"`
	UsedPercent Distribution `json:"usedPercent"`
	Limit       string       `json:"limit"`
	Ready       string       `json:"ready"`
}

type SorterData

type SorterData struct {
	Field string `json:"field"`
	Order string `json:"order"`
}

type State

type State struct {
	PageNo     int        `json:"pageNo"`
	PageSize   int        `json:"pageSize"`
	Total      int        `json:"total"`
	SorterData SorterData `json:"sorterData"`
}

type Status

type Status struct {
	RenderType  string      `json:"renderType"`
	Value       string      `json:"value"`
	StyleConfig StyleConfig `json:"styleConfig"`
	Tip         string      `json:"tip,omitempty"`
}

type StyleConfig

type StyleConfig struct {
	Color string `json:"color"`
}

type Table

type Table struct {
	base.DefaultProvider
	TableInterface
	Ctx        context.Context
	CtxBdl     *bundle.Bundle
	SDK        *cptype.SDK
	Type       string                 `json:"type"`
	Props      map[string]interface{} `json:"props"`
	Operations map[string]interface{} `json:"operations"`
	State      State                  `json:"state"`
}

func (*Table) GetIp

func (t *Table) GetIp(node data.Object) string

func (*Table) GetItemStatus

func (t *Table) GetItemStatus(percent float64) *Status

func (*Table) GetResourceReq

func (t *Table) GetResourceReq(pod data.Object, resourceKind string, resourceType v1.ResourceName) string

func (*Table) GetRole

func (t *Table) GetRole(labels []string) string

func (*Table) GetUsageValue

func (t *Table) GetUsageValue(metricsData metrics.MetricsData) *DistributionValue

func (*Table) SetComponentValue

func (t *Table) SetComponentValue(c *cptype.Component) error

SetComponentValue mapping CpuInfoTable properties to Component

type TableInterface

type TableInterface interface {
	SetData(object data.Object, resName v1.ResourceName) error
}

Jump to

Keyboard shortcuts

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