k8s

package
v0.0.0-...-69f7e36 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 16 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
}

func NewClient

func NewClient(logger *slog.Logger, restConfig *rest.Config) (Client, error)

func (Client) GetPods

func (c Client) GetPods(ctx context.Context, namespace, labelSelector string) ([]Pod, error)

type Forwarder

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

func (Forwarder) Get

func (f Forwarder) Get(path string, params url.Values) (int, []byte, error)

Get sends http GET request with specified params to port forwarded pod's path and returns status code and response body

func (Forwarder) Stop

func (f Forwarder) Stop()

Stop stops port forwarding

type Pod

type Pod struct {
	Name      string
	Namespace string
}

type PortForward

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

func NewPortForward

func NewPortForward(logger *slog.Logger, restConfig *rest.Config) (PortForward, error)

func (PortForward) Start

func (p PortForward) Start(namespace, labelSelector, port string) (Forwarder, error)

Start starts port forwarding to specified pod

Jump to

Keyboard shortcuts

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