instance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

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