podclient

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client reaches a pod-local HTTP endpoint through Kubernetes port-forwarding.

func New

func New(
	config *rest.Config,
	clientset kubernetes.Interface,
	namespace string,
	labelSelector string,
	remotePort int,
) *Client

New creates a client for ready pods matching a label selector.

func (*Client) Exec

func (c *Client) Exec(ctx context.Context, pod, container string, command []string, maxBytes int64) ([]byte, error)

Exec returns stdout without exposing stderr. Zero maxBytes is unlimited.

func (*Client) Get

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

Get sends a GET through a fresh loopback tunnel and rotates across ready pods.

func (*Client) GetFromPod

func (c *Client) GetFromPod(ctx context.Context, name, path string, maxBytes int64) ([]byte, error)

GetFromPod reads a named pod even when it isn't ready. Zero maxBytes is unlimited.

Jump to

Keyboard shortcuts

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