instance

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 1 module, 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 Instance

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

Instance instance 实例对象封装

func New

func New(options ...Option) *Instance

New 新建 addon service

func (*Instance) ListAppUsageByProject

func (i *Instance) ListAppUsageByProject(orgID, projectID, workspace string, limited_app_ids []string) ([]apistructs.ApplicationUsageFetchResponseData, error)

ListAppUsageByProject 根据 projectID 获取项目下各应用资源使用统计

func (*Instance) ListProjectUsageByCluster

func (i *Instance) ListProjectUsageByCluster(orgID, clusterName, workspace string, limited_project_ids []string) ([]apistructs.ProjectUsageFetchResponseData, error)

ListProjectUsageByCluster 根据 clusterName 获取集群下项目资源使用列表

func (*Instance) ListRuntimeUsageByApp

func (i *Instance) ListRuntimeUsageByApp(orgID, appID, workspace string, limited_runtime_ids []string) ([]apistructs.RuntimeUsageFetchResponseData, error)

ListRuntimeUsageByApp 根据 appID 获取应用下各 runtime 资源使用统计

func (*Instance) ListServiceUsageByRuntime

func (i *Instance) ListServiceUsageByRuntime(orgID, runtimeID, workspace string, limited_service_names []string) ([]apistructs.ServiceUsageFetchResponseData, error)

ListServiceUsageByRuntime 根据 runtimeID 获取 runtime 下各 service 资源使用统计

type Option

type Option func(*Instance)

Option addon 实例对象配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

Jump to

Keyboard shortcuts

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