model

package
v0.1.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationResponse

type AnnotationResponse struct {
	// The original annotation sent from Grafana.
	// Annotation Annotation `json:"annotation"`
	// Time since UNIX Epoch in milliseconds. (required)
	Time int64 `json:"time"`
	// The title for the annotation tooltip. (required)
	Title string `json:"title"`
	// Tags for the annotation. (optional)
	Tags string `json:"tags"`
	// Text for the annotation. (optional)
	Text string `json:"text"`
}

AnnotationResponse contains all the information needed to render an annotation event.

https://github.com/grafana/simple-json-datasource#annotation-api

type BizInfoTable

type BizInfoTable struct {
	ClusterName string `json:"ClusterName,omitempty"`
	Namespace   string `json:"Namespace,omitempty"`
}

Take this as Example: https://sriramajeyam.com/grafana-infinity-datasource/wiki/json

type ClusterTable

type ClusterTable struct {
	Cluster string `json:"cluster,omitempty"`
	Number  string `json:"number,omitempty"`
}

type DataFrame

type DataFrame struct {
	Schema SchemaType `json:"schema,omitempty"`
	Data   DataType   `json:"data,omitempty"`
}

func ConvertPodYamlGraphEdges2Frame

func ConvertPodYamlGraphEdges2Frame(edges []PodYamlGraphEdges) DataFrame

func ConvertPodYamlGraphNodes2Frame

func ConvertPodYamlGraphNodes2Frame(nodes []PodYamlGraphNodes) DataFrame

type DataType

type DataType struct {
	Values []interface{} `json:"values,omitempty"`
}

type DeliveryPodCreateOrDeleteTable

type DeliveryPodCreateOrDeleteTable struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type DeliveryPodUpgradeTable

type DeliveryPodUpgradeTable struct {
	Index string `json:"index,omitempty"`
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type ExtraPropertyConfig

type ExtraPropertyConfig struct {
	Name       string `json:"name,omitempty"`
	ValueRex   string `json:"valueRex,omitempty"`   //json path to Value
	NeedChange bool   `json:"needChange,omitempty"` //is need change
	Resource   string `json:"resource,omitempty"`   //resource to extract
}

ExtraPropertyConfig config for property extractor

type FieldType

type FieldType struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
}

type KeyLifecycleEvents

type KeyLifecycleEvents struct {
	StartTime     string `json:"startTime,omitempty"`
	UserAgent     string `json:"UserAgent,omitempty"`
	PlfID         string `json:"PlfID,omitempty"`
	TraceStage    string `json:"TraceStage,omitempty"`
	OperationName string `json:"operationName,omitempty"`
	Reason        string `json:"reason,omitempty"`
	Message       string `json:"message,omitempty"`
}

type NamespaceTable

type NamespaceTable struct {
	Namespace string `json:"namespace,omitempty"`
	Number    string `json:"number,omitempty"`
}

type NodeTable

type NodeTable struct {
	Node   string `json:"node,omitempty"`
	Number string `json:"number,omitempty"`
}

type NodeYamlTable added in v0.1.6

type NodeYamlTable struct {
	AuditID        string    `json:"AuditID,omitempty"`
	NodeName       string    `json:"NodeName,omitempty"`
	NodeIp         string    `json:"NodeIp,omitempty"`
	UID            string    `json:"UID,omitempty"`
	ClusterName    string    `json:"ClusterName,omitempty"`
	Node           *v1.Node  `json:"Node,omitempty"`
	StageTimeStamp time.Time `json:"StageTimeStamp,omitempty"`
}

type PhaseTable added in v0.1.6

type PhaseTable struct {
	EndTime       time.Time   `json:"endTime,omitempty"`
	ClusterName   string      `json:"clusterName,omitempty"`
	DataSourceId  string      `json:"dataSourceId,omitempty"`
	HasErr        bool        `json:"hasErr"`
	Namespace     string      `json:"namespace,omitempty" `
	OperationName string      `json:"operationName,omitempty" `
	PodUID        string      `json:"podUid,omitempty"`
	PodName       string      `json:"podName,omitempty" `
	StartTime     time.Time   `json:"startTime,omitempty" `
	ExtraInfo     interface{} `json:"extraInfo,omitempty"`
	TraceStage    string      `json:"traceStage"`
}

type PodInfoTable

type PodInfoTable struct {
	ClusterName string `json:"ClusterName,omitempty"`
	Namespace   string `json:"Namespace,omitempty"`
	PodName     string `json:"PodName,omitempty"`
	PodUID      string `json:"PodUID,omitempty"`
	PodIP       string `json:"PodIP,omitempty"`
	PodYaml     string `json:"PodYaml,omitempty"`
	NodeName    string `json:"NodeName,omitempty"`
	NodeIP      string `json:"NodeIP,omitempty"`
	NodeYaml    string `json:"NodeYaml,omitempty"`
}

type PodListTable

type PodListTable struct {
	DeliveryTime       string `json:"交付时间,omitempty"`
	Namespace          string `json:"namespace,omitempty"`
	Cluster            string `json:"cluster,omitempty"`
	PodUID             string `json:"PodUid,omitempty"`
	PodName            string `json:"PodName,omitempty"`
	NodeIP             string `json:"node,omitempty"`
	SLO                string `json:"交付SLO,omitempty"`
	Result             string `json:"交付结果,omitempty"`
	DebugUrl           string `json:"诊断链接,omitempty"`
	SLOViolationReason string `json:"SLOViolationReason"`
}

type PodStatusTable

type PodStatusTable struct {
	PodPhase      string `json:"PodPhase,omitempty"`
	UpTime        string `json:"UpTime,omitempty"`
	State         string `json:"State,omitempty"`
	CreateTime    string `json:"CreatedAt,omitempty"`
	LastTimeStamp string `json:"LastActiveAt,omitempty"`
}

type PodYamlGraphEdges

type PodYamlGraphEdges struct {
	Id, Source, Target, MainStat string
}

type PodYamlGraphNodes

type PodYamlGraphNodes struct {
	Id, Title, SubTitle, MainStat, SecondaryStat, Detail_one string
	Blue, Green, Yellow, Red                                 float64
}

Node Graph for Pod Yaml

type PodYamlTable added in v0.1.6

type PodYamlTable struct {
	AuditID        string    `json:"AuditID,omitempty"`
	ClusterName    string    `json:"ClusterName,omitempty"`
	HostIP         string    `json:"HostIP,omitempty"`
	IsBeginDelete  string    `json:"IsBeginDelete,omitempty"`
	IsDeleted      string    `json:"IsDeleted,omitempty"`
	Pod            *v1.Pod   `json:"pod,omitempty"`
	PodIP          string    `json:"PodIP,omitempty"`
	PodName        string    `json:"PodName,omitempty"`
	PodUid         string    `json:"PodUid,omitempty"`
	StageTimestamp time.Time `json:"stageTimestamp,omitempty"`
}

type QueryPodListTable added in v0.1.7

type QueryPodListTable struct {
	Podname      string        `json:"podname,omitempty"`
	PodIP        string        `json:"podip,omitempty"`
	Cluster      string        `json:"cluster,omitempty"`
	PodUID       string        `json:"poduid,omitempty"`
	NodeIP       string        `json:"nodeip,omitempty"`
	NodeName     string        `json:"nodename,omitempty"`
	CreateTime   string        `json:"createTime,omitempty"`
	Namespace    string        `json:"namespace,omitempty"`
	State        string        `json:"state,omitempty"`
	PodPhase     string        `json:"podphase,omitempty"`
	WorkloadInfo WorkloadTable `json:"workloadInfo,omitempty"`
}

type RecordTimeTable added in v0.1.8

type RecordTimeTable struct {
	Cluster      string `json:"cluster,omitempty"`
	TimeDuration int64  `json:"timeDuration,omitempty"`
	LastRecord   string `json:"lastRecord,omitempty"`
}

type SchemaType

type SchemaType struct {
	Fields []FieldType `json:"fields,omitempty"`
	Name   string      `json:"name,omitempty"`
}

type SloTable

type SloTable struct {
	Slo    string `json:"SLO,omitempty"`
	Number string `json:"number,omitempty"`
}

type StateData

type StateData struct {
	Time   string `json:"time"`
	Status string `json:"status"`
}

type WorkloadTable added in v0.1.10

type WorkloadTable struct {
	ClusterName string `json:"ClusterName,omitempty"`
	Namespace   string `json:"Namespace,omitempty"`
	Name        string `json:"Name,omitempty"`
	UID         string `json:"Uid,omitempty"`
	Kind        string `json:"Kind,omitempty"`
}

Jump to

Keyboard shortcuts

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