dynaward

package
v0.0.0-...-7c966ab Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerbosityLevelOptions = map[VerbosityLevel][]string{
	InfoVerbosityLevel:  {"", "i", "info"},
	DebugVerbosityLevel: {"d", "debug"},
	TraceVerbosityLevel: {"t", "trace"},
}

Functions

func InjectForwardPool

func InjectForwardPool(r *http.Request, fwd *ForwardPool) *http.Request

Types

type ForwardConnection

type ForwardConnection struct {
	Conn httpstream.Connection

	StartTime   time.Time
	Namespace   string
	ServiceName string
	ServicePort string
	PodUID      string
	PodName     string
	PodPort     int
}

type ForwardPool

type ForwardPool struct {
	Client *kubernetes.Clientset
	Config *rest.Config
	Logger *slog.Logger
	// contains filtered or unexported fields
}

func ExtractForwardPool

func ExtractForwardPool(r *http.Request) *ForwardPool

func (*ForwardPool) Close

func (fwd *ForwardPool) Close()

func (*ForwardPool) ConnectionFor

func (fwd *ForwardPool) ConnectionFor(ctx context.Context, hostport string) (*ForwardConnection, error)

ConnectionFor finds an existing connection to a pod, or creates it if one didn't already exist.

type Options

type Options struct {
	genericiooptions.IOStreams

	Listen string

	Control   bool
	Verbosity VerbosityLevel

	Namespaces        []string
	AllNamespaces     bool
	ExplicitNamespace bool
}

func (*Options) Bind

func (o *Options) Bind(cmd *cobra.Command)

func (*Options) Complete

func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

Complete takes the command arguments and factory and infers any remaining options.

func (*Options) Run

func (o *Options) Run(f cmdutil.Factory) error

func (*Options) Validate

func (o *Options) Validate(_ *cobra.Command) error

Validate checks the set of flags provided by the user.

type VerbosityLevel

type VerbosityLevel enumflag.Flag
const (
	InfoVerbosityLevel VerbosityLevel = iota
	DebugVerbosityLevel
	TraceVerbosityLevel
)

Jump to

Keyboard shortcuts

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