api

package
v0.16.10 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8sClientContextValue

func GetK8sClientContextValue(ctx context.Context) (*k8s.Client, bool)

GetK8sClientContextValue retrieves the k8s.Client from a context that was stored by SetK8sClientContextValue.

func GetNamespaceContextValue

func GetNamespaceContextValue(ctx context.Context) (string, bool)

GetNamespaceContextValue retrieves the namespace from a context that was stored by SetNamespaceContextValue.

func SetK8sClientContextValue

func SetK8sClientContextValue(ctx context.Context, client *k8s.Client) context.Context

SetK8sClientContextValue stores a namespace string as a context value and returns the resulting context. You can access the namespace by calling GetK8sClientContextValue.

func SetNamespaceContextValue

func SetNamespaceContextValue(ctx context.Context, namespace string) context.Context

SetNamespaceContextValue stores a namespace string as a context value and returns the resulting context. You can access the namespace by calling GetNamespaceContextValue.

Types

type ConnectivityTestHooks

type ConnectivityTestHooks interface {
	connectivity.Hooks
	// AddConnectivityTestFlags is an hook to register additional connectivity test flags.
	AddConnectivityTestFlags(flags *pflag.FlagSet)
}

ConnectivityTestHooks to extend cilium-cli with additional connectivity tests and related flags.

type Hooks

type Hooks interface {
	ConnectivityTestHooks
	sysdump.Hooks
	// InitializeCommand gets called with the root command before returning it
	// from cli.NewCiliumCommand.
	InitializeCommand(rootCmd *cobra.Command)
}

Hooks to extend the default cilium-cli command with additional functionality.

type NopHooks

type NopHooks struct{}

func (*NopHooks) AddConnectivityTestFlags

func (*NopHooks) AddConnectivityTestFlags(*pflag.FlagSet)

func (*NopHooks) AddConnectivityTests

func (*NopHooks) AddConnectivityTests(*check.ConnectivityTest) error

func (*NopHooks) AddSysdumpFlags

func (*NopHooks) AddSysdumpFlags(*pflag.FlagSet)

func (*NopHooks) AddSysdumpTasks

func (*NopHooks) AddSysdumpTasks(*sysdump.Collector) error

func (*NopHooks) DetectFeatures

func (*NopHooks) DetectFeatures(context.Context, *check.ConnectivityTest) error

func (*NopHooks) InitializeCommand

func (*NopHooks) InitializeCommand(*cobra.Command)

func (*NopHooks) SetupAndValidate

func (*NopHooks) SetupAndValidate(context.Context, *check.ConnectivityTest) error

Jump to

Keyboard shortcuts

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