fake

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fake provides a fake implementation of clientcmd.Client for use in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() clientcmd.Client

Types

type Client

type Client struct {
	ExecFunc func(ctx context.Context, pod *corev1.Pod, containerName string, command []string, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
	RESTFunc func() restclient.Interface
}

Client is a fake clientcmd.Client. Set ExecFunc and RESTFunc to control behavior; unset functions fall back to no-op defaults (Exec returns nil, REST returns nil).

func (*Client) Exec

func (c *Client) Exec(ctx context.Context, pod *corev1.Pod, containerName string, command []string, stdin io.Reader, stdout, stderr io.Writer, tty bool) error

func (*Client) REST

func (c *Client) REST() restclient.Interface

Jump to

Keyboard shortcuts

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