v1alpha3

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Copyright 2019 The KubeSphere Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	KubeSphereWorkspaceCount = "kubesphere_workspace_count"
	KubeSphereUserCount      = "kubesphere_user_count"
	KubeSphereClusterCount   = "kubesphere_cluser_count"
	KubeSphereAppTmplCount   = "kubesphere_app_template_count"

	WorkspaceNamespaceCount = "workspace_namespace_count"
	WorkspaceDevopsCount    = "workspace_devops_project_count"
	WorkspaceMemberCount    = "workspace_member_count"
	WorkspaceRoleCount      = "workspace_role_count"
)
View Source
const (
	MetricsSep = "|"
	MetricsEnd = "$"
)
View Source
const (
	OrderAscending  = "asc"
	OrderDescending = "desc"

	DefaultStep  = 10 * time.Minute
	DefaultOrder = OrderDescending
	DefaultPage  = 1
	DefaultLimit = 5
)
View Source
const DefaultFilter = ".*"
View Source
const QueryTimeout = 10 * time.Second

Variables

View Source
var GroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha3"}

Functions

func AddToContainer

func AddToContainer(c *restful.Container, k8sClient kubernetes.Interface, monitoringClient monitoring.Interface, factory informers.InformerFactory, opClient openpitrix.Client) error

Types

type Metadata

type Metadata struct {
	Data []monitoring.Metadata `json:"data" description:"actual array of results"`
}

type MetricLabelSet

type MetricLabelSet struct {
	Data []map[string]string `json:"data" description:"actual array of results"`
}

type Metrics

type Metrics struct {
	Results     []monitoring.Metric `json:"results" description:"actual array of results"`
	CurrentPage int                 `json:"page,omitempty" description:"current page returned"`
	TotalPages  int                 `json:"total_page,omitempty" description:"total number of pages"`
	TotalItems  int                 `json:"total_item,omitempty" description:"page size"`
}

func (*Metrics) Page

func (raw *Metrics) Page(page, limit int) *Metrics

func (*Metrics) Sort

func (raw *Metrics) Sort(target, order, identifier string) *Metrics

SortMetrics sorts a group of resources by a given metric. Range queryMetrics doesn't support ranking. Example:

Before sorting: | ID | Metric 1 | Metric 2 | Metric 3 | | a | 1 | XL | | | b | 1 | S | | | c | 3 | M | |

After sorting: target=metric_2, order=asc, identifier=id | ID | Metric 1 | Metric 2 (asc) | Metric 3 | | a | 1 | XL | | | c | 3 | M | | | b | 1 | S | |

type SortOptions

type SortOptions struct {
	// contains filtered or unexported fields
}

func (*SortOptions) ShouldSort

func (opt *SortOptions) ShouldSort() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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