Documentation ¶
Index ¶
- func WrapRunnables(cmd *cobra.Command, wrapper RunnableWrapper)
- type RootArgs
- type RootContext
- func (rc *RootContext) Config() *config_proto.Configuration
- func (rc *RootContext) CurrentApiClient() (kumactl_resources.ApiServerClient, error)
- func (rc *RootContext) CurrentContext() (*config_proto.Context, error)
- func (rc *RootContext) CurrentControlPlane() (*config_proto.ControlPlane, error)
- func (rc *RootContext) CurrentDataplaneOverviewClient() (kumactl_resources.DataplaneOverviewClient, error)
- func (rc *RootContext) CurrentDataplaneTokenClient() (tokens.DataplaneTokenClient, error)
- func (rc *RootContext) CurrentMesh() string
- func (rc *RootContext) CurrentResourceStore() (core_store.ResourceStore, error)
- func (rc *RootContext) CurrentServiceOverviewClient() (kumactl_resources.ServiceOverviewClient, error)
- func (rc *RootContext) CurrentZoneIngressOverviewClient() (kumactl_resources.ZoneIngressOverviewClient, error)
- func (rc *RootContext) CurrentZoneIngressTokenClient() (tokens.ZoneIngressTokenClient, error)
- func (rc *RootContext) CurrentZoneOverviewClient() (kumactl_resources.ZoneOverviewClient, error)
- func (rc *RootContext) IsFirstTimeUsage() bool
- func (rc *RootContext) LoadConfig() error
- func (rc *RootContext) Now() time.Time
- func (rc *RootContext) SaveConfig() error
- func (rc *RootContext) TypeForArg(arg string) (core_model.ResourceType, error)
- type RootRuntime
- type RunnableWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapRunnables ¶
func WrapRunnables(cmd *cobra.Command, wrapper RunnableWrapper)
Types ¶
type RootContext ¶
type RootContext struct { TypeArgs map[string]core_model.ResourceType Args RootArgs Runtime RootRuntime GetContext get_context.GetContext ListContext get_context.ListContext InspectContext inspect_context.InspectContext InstallCpContext install_context.InstallCpContext InstallMetricsContext install_context.InstallMetricsContext InstallCRDContext install_context.InstallCrdsContext InstallDemoContext install_context.InstallDemoContext InstallGatewayKongContext install_context.InstallGatewayKongContext InstallGatewayKongEnterpriseContext install_context.InstallGatewayKongEnterpriseContext }
RootContext contains variables, functions and components that can be overridden when extending kumactl or running the test. Example:
rootCtx := kumactl_cmd.DefaultRootContext() rootCtx.InstallCpContext.Args.ControlPlane_image_tag = "0.0.1" rootCmd := cmd.NewRootCmd(rootCtx) err := rootCmd.Execute()
func DefaultRootContext ¶
func DefaultRootContext() *RootContext
func (*RootContext) Config ¶
func (rc *RootContext) Config() *config_proto.Configuration
func (*RootContext) CurrentApiClient ¶
func (rc *RootContext) CurrentApiClient() (kumactl_resources.ApiServerClient, error)
func (*RootContext) CurrentContext ¶
func (rc *RootContext) CurrentContext() (*config_proto.Context, error)
func (*RootContext) CurrentControlPlane ¶
func (rc *RootContext) CurrentControlPlane() (*config_proto.ControlPlane, error)
func (*RootContext) CurrentDataplaneOverviewClient ¶
func (rc *RootContext) CurrentDataplaneOverviewClient() (kumactl_resources.DataplaneOverviewClient, error)
func (*RootContext) CurrentDataplaneTokenClient ¶
func (rc *RootContext) CurrentDataplaneTokenClient() (tokens.DataplaneTokenClient, error)
func (*RootContext) CurrentMesh ¶
func (rc *RootContext) CurrentMesh() string
func (*RootContext) CurrentResourceStore ¶
func (rc *RootContext) CurrentResourceStore() (core_store.ResourceStore, error)
func (*RootContext) CurrentServiceOverviewClient ¶
func (rc *RootContext) CurrentServiceOverviewClient() (kumactl_resources.ServiceOverviewClient, error)
func (*RootContext) CurrentZoneIngressOverviewClient ¶
func (rc *RootContext) CurrentZoneIngressOverviewClient() (kumactl_resources.ZoneIngressOverviewClient, error)
func (*RootContext) CurrentZoneIngressTokenClient ¶
func (rc *RootContext) CurrentZoneIngressTokenClient() (tokens.ZoneIngressTokenClient, error)
func (*RootContext) CurrentZoneOverviewClient ¶
func (rc *RootContext) CurrentZoneOverviewClient() (kumactl_resources.ZoneOverviewClient, error)
func (*RootContext) IsFirstTimeUsage ¶
func (rc *RootContext) IsFirstTimeUsage() bool
func (*RootContext) LoadConfig ¶
func (rc *RootContext) LoadConfig() error
func (*RootContext) Now ¶
func (rc *RootContext) Now() time.Time
func (*RootContext) SaveConfig ¶
func (rc *RootContext) SaveConfig() error
func (*RootContext) TypeForArg ¶
func (rc *RootContext) TypeForArg(arg string) (core_model.ResourceType, error)
type RootRuntime ¶
type RootRuntime struct { Config config_proto.Configuration Now func() time.Time NewResourceStore func(*config_proto.ControlPlaneCoordinates_ApiServer) (core_store.ResourceStore, error) NewDataplaneOverviewClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (kumactl_resources.DataplaneOverviewClient, error) NewZoneIngressOverviewClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (kumactl_resources.ZoneIngressOverviewClient, error) NewZoneOverviewClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (kumactl_resources.ZoneOverviewClient, error) NewServiceOverviewClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (kumactl_resources.ServiceOverviewClient, error) NewDataplaneTokenClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (tokens.DataplaneTokenClient, error) NewZoneIngressTokenClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (tokens.ZoneIngressTokenClient, error) NewAPIServerClient func(*config_proto.ControlPlaneCoordinates_ApiServer) (kumactl_resources.ApiServerClient, error) }
Click to show internal directories.
Click to hide internal directories.