pkgkubernetes

package
v1.777.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2025 The OpenAgent Authors. All Rights Reserved.

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pod

type Pod struct {
	Owner       string `xorm:"varchar(100) notnull pk" json:"owner"`
	Name        string `xorm:"varchar(100) notnull pk" json:"name"`
	Provider    string `xorm:"varchar(100)" json:"provider"`
	Namespace   string `xorm:"varchar(100)" json:"namespace"`
	CreatedTime string `xorm:"varchar(100)" json:"createdTime"`
	HostIP      string `xorm:"varchar(100)" json:"hostIP"`
	PodIP       string `xorm:"varchar(100)" json:"podIP"`
	Labels      string `xorm:"varchar(100)" json:"labels"`
	Status      string `xorm:"varchar(100)" json:"status"`
}

type PodClient

type PodClient struct {
	Client *kubernetes.Clientset
}

func NewPodClient

func NewPodClient(providerType string, masterUrl string, kubeconfigPath string, region string) (PodClient, error)

func (PodClient) GetPod

func (client PodClient) GetPod(name string, lang string) (*Pod, error)

func (PodClient) GetPods

func (client PodClient) GetPods() ([]*Pod, error)

func (PodClient) UpdatePodState

func (client PodClient) UpdatePodState(name string, state string) (bool, string, error)

The status of Pods includes Pending, Running, Succeeded, Failed, etc. These statuses are automatically updated by Kubernetes' scheduler, controllers (such as Deployment, StatefulSet, etc.), and kubelet components based on the cluster's status. Cannot be modified through API.

Jump to

Keyboard shortcuts

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