cmd

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cmd contains the cobra command code for each subcommand of the telemetry plugin

Index

Constants

View Source
const (
	UpdateCeipOptInFlag  = "CEIP-opt-in"
	UpdateCeipOptOutFlag = "CEIP-opt-out"
	UpdateEanFlag        = "entitlement-account-number"
	UpdateCspOrgFlag     = "csp-org-id"
	UpdateEnvIsProdFlag  = "env-is-prod"
)

Update Command Flags

Variables

This section is empty.

Functions

This section is empty.

Types

type StatusCmd

type StatusCmd struct {
	Cmd          *cobra.Command
	ClientGetter func() (dynamic.Interface, error)
	// contains filtered or unexported fields
}

func NewStatusCmd

func NewStatusCmd(clientGetter func() (dynamic.Interface, error), out component.OutputWriter) *StatusCmd

NewStatusCmd creates a status cmd and injects a function for retrieving a k8s client Allows us to unit test by injecting a fake client

func (*StatusCmd) Status

func (sc *StatusCmd) Status(_ *cobra.Command, _ []string) error

Status prints the status of telemetry settings on the cluster

type UpdateCmd

type UpdateCmd struct {
	Cmd          *cobra.Command
	ClientGetter func() (dynamic.Interface, error)
	// contains filtered or unexported fields
}

func NewUpdateCmd

func NewUpdateCmd(clientGetter func() (dynamic.Interface, error), out component.OutputWriter) *UpdateCmd

NewUpdateCmd creates an update cmd and injects a function for retrieving a k8s client Allows us to unit test by injecting a fake client

func (*UpdateCmd) Update

func (uc *UpdateCmd) Update(_ *cobra.Command, _ []string) error

Update configures telemetry settings on the targeted cluster

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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