kubeapi

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKubeconfigPath

func DefaultKubeconfigPath() string

func RewriteKubeconfigWithBearerToken

func RewriteKubeconfigWithBearerToken(path string, token string) error

Types

type Client

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

func New

func New() (*Client, error)

func NewFromBase64

func NewFromBase64(value string) (*Client, error)

func NewFromPath

func NewFromPath(path string) (*Client, error)

func NewFromPathWithBearerToken

func NewFromPathWithBearerToken(path string, token string) (*Client, error)

func (*Client) ClusterHost

func (c *Client) ClusterHost() string

func (*Client) ClusterInfoText

func (c *Client) ClusterInfoText() string

func (*Client) CurrentContext

func (c *Client) CurrentContext() string

func (*Client) GatekeeperConstraints

func (c *Client) GatekeeperConstraints(ctx context.Context) ([]map[string]any, error)

func (*Client) List

func (c *Client) List(ctx context.Context, resource string, allNamespaces bool) ([]map[string]any, error)

func (*Client) ListByGVR

func (c *Client) ListByGVR(ctx context.Context, gvr schema.GroupVersionResource, namespaced bool, allNamespaces bool) ([]map[string]any, error)

func (*Client) NodeMetrics

func (c *Client) NodeMetrics(ctx context.Context) (map[string]NodeMetric, error)

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) error

func (*Client) Raw

func (c *Client) Raw(ctx context.Context, path string) ([]byte, error)

func (*Client) ServerVersion

func (c *Client) ServerVersion(ctx context.Context) (string, error)

type NodeMetric

type NodeMetric struct {
	CPUMilli int64
	MemBytes int64
}

Jump to

Keyboard shortcuts

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