utils

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright Contributors to the Open Cluster Management project

Index

Constants

View Source
const (
	LEVEL_0 = iota
	LEVEL_1
	LEVEL_2
	LEVEL_3
	LEVEL_4
)

Each level has 2 spaces for PrefixWriter

View Source
const PortForwardProtocolV1Name = "portforward.k8s.io"

PortForwardProtocolV1Name is the subprotocol used for port forwarding.

Variables

This section is empty.

Functions

func GetSpinnerPodStatus

func GetSpinnerPodStatus(pod *corev1.Pod) string

func NewSpinner

func NewSpinner(suffix string, interval time.Duration) *spinner.Spinner

func NewSpinnerWithStatus

func NewSpinnerWithStatus(suffix string, interval time.Duration, final string, statusFunc func() string) *spinner.Spinner

Types

type LocalProxyServer

type LocalProxyServer interface {
	Listen() (func(), error)
}

func NewLocalProxy

func NewLocalProxy(
	restConfig *rest.Config,
	podNamespace,
	podName string,
	targetPort int32) LocalProxyServer

type PrefixWriter

type PrefixWriter interface {
	// Write writes text with the specified indentation level.
	Write(level int, format string, a ...interface{})
	// WriteLine writes an entire line with no indentation level.
	WriteLine(a ...interface{})
	// Flush forces indentation to be reset.
	Flush()
}

PrefixWriter can write text at various indentation levels.

func NewPrefixWriter

func NewPrefixWriter(out io.Writer) PrefixWriter

NewPrefixWriter creates a new PrefixWriter.

Jump to

Keyboard shortcuts

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