bcs

package
v0.0.0-...-8e1e73d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package bcs provides bcs api client.

Package bcs provides bcs api client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryNode

func QueryNode(ctx context.Context, clusterID string, name string) (*corev1.Node, error)

QueryNode 通过集群ID和 Node name 查询 Node 信息

func QueryPod

func QueryPod(ctx context.Context, clusterID string, uid string) (*corev1.Pod, error)

QueryPod 通过集群ID和 pod UID 查询 pod 信息

Types

type Project

type Project struct {
	Name          string `json:"name"`
	ProjectId     string `json:"projectID"`
	Code          string `json:"projectCode"`
	CcBizID       string `json:"businessID"`
	Creator       string `json:"creator"`
	Kind          string `json:"kind"`
	RawCreateTime string `json:"createTime"`
}

Project 项目信息

func ListAuthorizedProjects

func ListAuthorizedProjects(ctx context.Context, username string) ([]*Project, error)

ListAuthorizedProjects 通过 用户 获取项目信息

func ListProjects

func ListProjects(ctx context.Context, projectCodeList []string) ([]*Project, error)

ListProjects 按项目 Code 查询

func (*Project) CreateTime

func (p *Project) CreateTime() (time.Time, error)

CreateTime xxx

func (*Project) String

func (p *Project) String() string

String :

type QueryNodeData

type QueryNodeData struct {
	ClusterID    string       `json:"clusterID"`
	Namespace    string       `json:"namespace"`
	ResourceName string       `json:"resourceName"`
	ResourceType string       `json:"resourceType"`
	CreateTime   string       `json:"createTime"`
	UpdateTime   string       `json:"updateTime"`
	Data         *corev1.Node `json:"data"`
}

QueryNodeData 通过集群ID和 Node name 查询 Node 信息

type QueryPodData

type QueryPodData struct {
	ClusterID    string      `json:"clusterID"`
	Namespace    string      `json:"namespace"`
	ResourceName string      `json:"resourceName"`
	ResourceType string      `json:"resourceType"`
	CreateTime   string      `json:"createTime"`
	UpdateTime   string      `json:"updateTime"`
	Data         *corev1.Pod `json:"data"`
}

QueryPodData 通过集群ID和 pod UID 查询 pod 信息返回

Jump to

Keyboard shortcuts

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