k8s

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCommand

func ExecCommand(ctx context.Context, cfg *rest.Config, podNamespace, podName, containerName string, cmd []string, opts *ExecOptions) error

func NewPodLogOptions

func NewPodLogOptions(lsOptions config.LogStreamOptions) *corev1.PodLogOptions

Types

type ExecOptions

type ExecOptions struct {
	In              io.Reader
	Out             io.Writer
	ErrOut          io.Writer
	TTY             bool
	InterruptParent *interrupt.Handler
}

func (*ExecOptions) CreateTTY

type LogStreamer

type LogStreamer struct {
	OsWriters    logging.OsWriters
	Details      app.Details
	AppNamespace string
	AppName      string
	NewConfigFn  NewConfiger
	Emitter      MessageEmitter
}

func (LogStreamer) Stream

func (l LogStreamer) Stream(ctx context.Context, options config.LogStreamOptions) error

type MessageEmitter

type MessageEmitter func(w io.Writer, podName, containerName, line string) error

type NewConfiger

type NewConfiger func(ctx context.Context) (*rest.Config, error)

type RestClientGetter

type RestClientGetter struct {
	Config *rest.Config
}

func (RestClientGetter) ToDiscoveryClient

func (g RestClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

ToDiscoveryClient returns discovery client

func (RestClientGetter) ToRESTConfig

func (g RestClientGetter) ToRESTConfig() (*rest.Config, error)

ToRESTConfig returns restconfig

func (RestClientGetter) ToRESTMapper

func (g RestClientGetter) ToRESTMapper() (meta.RESTMapper, error)

ToRESTMapper returns a restmapper

func (RestClientGetter) ToRawKubeConfigLoader

func (g RestClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

ToRawKubeConfigLoader return kubeconfig loader as-is

Jump to

Keyboard shortcuts

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