Documentation ¶
Index ¶
- func GetK8sClientContextValue(ctx context.Context) (*k8s.Client, bool)
- func GetNamespaceContextValue(ctx context.Context) (string, bool)
- func SetK8sClientContextValue(ctx context.Context, client *k8s.Client) context.Context
- func SetNamespaceContextValue(ctx context.Context, namespace string) context.Context
- type ConnectivityTestHooks
- type Hooks
- type NopHooks
- func (*NopHooks) AddConnectivityTestFlags(*pflag.FlagSet)
- func (*NopHooks) AddConnectivityTests(*check.ConnectivityTest) error
- func (*NopHooks) AddSysdumpFlags(*pflag.FlagSet)
- func (*NopHooks) AddSysdumpTasks(*sysdump.Collector) error
- func (*NopHooks) DetectFeatures(context.Context, *check.ConnectivityTest) error
- func (*NopHooks) InitializeCommand(*cobra.Command)
- func (*NopHooks) SetupAndValidate(context.Context, *check.ConnectivityTest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetK8sClientContextValue ¶
GetK8sClientContextValue retrieves the k8s.Client from a context that was stored by SetK8sClientContextValue.
func GetNamespaceContextValue ¶
GetNamespaceContextValue retrieves the namespace from a context that was stored by SetNamespaceContextValue.
func SetK8sClientContextValue ¶
SetK8sClientContextValue stores a namespace string as a context value and returns the resulting context. You can access the namespace by calling GetK8sClientContextValue.
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) AddConnectivityTests ¶
func (*NopHooks) AddConnectivityTests(*check.ConnectivityTest) error
func (*NopHooks) AddSysdumpFlags ¶
func (*NopHooks) DetectFeatures ¶
func (*NopHooks) InitializeCommand ¶
func (*NopHooks) SetupAndValidate ¶
Click to show internal directories.
Click to hide internal directories.