kubernetes

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigPath added in v0.8.1

func ConfigPath() string

Types

type Client

type Client interface {
	kubernetes.Interface

	ConfigPath() string
	Config() *rest.Config
	Namespace() string

	PodCIDR(ctx context.Context) (string, error)
	ServiceCIDR(ctx context.Context) (string, error)

	ServicePods(ctx context.Context, namespace, name string) ([]corev1.Pod, error)
	ServicePod(ctx context.Context, namespace, name string) (*corev1.Pod, error)
	ServiceAddress(ctx context.Context, namespace, name string) (string, error)
	ServicePortForward(ctx context.Context, namespace, name, address string, ports map[int]int, readyChan chan struct{}) error

	PodExec(ctx context.Context, namespace, name, container string, command []string, tty bool, stdin io.Reader, stdout, stderr io.Writer) error
	PodPortForward(ctx context.Context, namespace, name, address string, ports map[int]int, readyChan chan struct{}) error

	WaitForPod(ctx context.Context, namespace, name string) (*corev1.Pod, error)
	WaitForService(ctx context.Context, namespace, name string) (*corev1.Service, error)

	ReadFileInPod(ctx context.Context, namespace, name, container, path string, data io.Writer) error
	CreateFileInPod(ctx context.Context, namespace, name, container, path string, data io.Reader) error
}

func New

func New() (Client, error)

func NewFromConfig

func NewFromConfig(path string) (Client, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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