cmd

package
v0.0.0-...-a4cc684 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestInstallFlag and TestCli are uses for black box testing
	TestInstallFlag bool
	TestCli         client.Client
)
View Source
var (
	// TODO: think about a efficient way to change selectors and ports when yaml files change
	// ports are coming from /deploy/charts and /deploy/kubernetes
	ComponentPortMap = map[kube.ComponentName]int{
		kube.Admin:      8080,
		kube.Grafana:    3000,
		kube.Nacos:      8848,
		kube.Prometheus: 9090,
		kube.Skywalking: 8080,
		kube.Zipkin:     9411,
	}
	// ComponentSelectorMap selectors are coming from /deploy/charts and /deploy/kubernetes
	ComponentSelectorMap = map[kube.ComponentName]string{
		kube.Admin:      "app.kubernetes.io/name=dubbo-admin",
		kube.Grafana:    "app.kubernetes.io/name=grafana",
		kube.Nacos:      "app.kubernetes.io/name=nacos",
		kube.Prometheus: "app=prometheus",
		kube.Skywalking: "app=skywalking, component=ui",
		kube.Zipkin:     "app.kubernetes.io/name=zipkin",
	}
)
View Source
var NewSelfSignedCert = tls.NewSelfSignedCert

Functions

func CompleteRuntimeList

func CompleteRuntimeList(cmd *cobra.Command, args []string, toComplete string, client *dubbo.Client) (matches []string, directive cobra.ShellCompDirective)

func CompleteTemplateList

func CompleteTemplateList(cmd *cobra.Command, args []string, toComplete string, client *dubbo.Client) (matches []string, directive cobra.ShellCompDirective)

func ConfigDashboardAdminCmd

func ConfigDashboardAdminCmd(baseCmd *cobra.Command)

func ConfigDashboardGrafanaCmd

func ConfigDashboardGrafanaCmd(baseCmd *cobra.Command)

func ConfigDashboardNacosCmd

func ConfigDashboardNacosCmd(baseCmd *cobra.Command)

func ConfigDashboardPrometheusCmd

func ConfigDashboardPrometheusCmd(baseCmd *cobra.Command)

func ConfigDashboardSkywalkingCmd

func ConfigDashboardSkywalkingCmd(baseCmd *cobra.Command)

func ConfigDashboardZipkinCmd

func ConfigDashboardZipkinCmd(baseCmd *cobra.Command)

func ConfigManifestDiffCmd

func ConfigManifestDiffCmd(baseCmd *cobra.Command)

func ConfigManifestGenerateCmd

func ConfigManifestGenerateCmd(baseCmd *cobra.Command)

func ConfigManifestInstallCmd

func ConfigManifestInstallCmd(baseCmd *cobra.Command)

func ConfigManifestUninstallCmd

func ConfigManifestUninstallCmd(baseCmd *cobra.Command)

func ConfigProfileDiffCmd

func ConfigProfileDiffCmd(baseCmd *cobra.Command)

func ConfigProfileListCmd

func ConfigProfileListCmd(baseCmd *cobra.Command)

func Execute

func Execute(args []string)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func NewClient

func NewClient(options ...dubbo.Option) (*dubbo.Client, func())

func NewGenerateCertificateCmd

func NewGenerateCertificateCmd(baseCmd *cobra.Command)

func NewRepositoryAddCmd

func NewRepositoryAddCmd(newClient ClientFactory) *cobra.Command

func NewRepositoryListCmd

func NewRepositoryListCmd(newClient ClientFactory) *cobra.Command

func NewRepositoryRemoveCmd

func NewRepositoryRemoveCmd(newClient ClientFactory) *cobra.Command

func NewRepositoryRenameCmd

func NewRepositoryRenameCmd(newClient ClientFactory) *cobra.Command

func RuntimeTemplateOptions

func RuntimeTemplateOptions(client *dubbo.Client) (string, error)

RuntimeTemplateOptions is a human-friendly table of valid Language Runtime to Template combinations. Exported for use in docs.

func UsageOptions

func UsageOptions(desc string, options ...interface{}) string

func ValidateTokenPath

func ValidateTokenPath(path string) error

Types

type ClientFactory

type ClientFactory func(...dubbo.Option) (*dubbo.Client, func())

ClientFactory defines a constructor which assists in the creation of a Client for use by commands. See the NewClient constructor which is the fully populated ClientFactory used by commands by default. See NewClientFactory which constructs a minimal ClientFactory for use during testing.

type DashboardCommonArgs

type DashboardCommonArgs struct {
	KubeConfigPath string
	// selected cluster info of kubeconfig
	Context string
	// contains filtered or unexported fields
}

type DeployConfig

type DeployConfig struct {
	KubeConfig    string
	Context       string
	Build         bool
	Apply         bool
	Namespace     string
	ContainerPort int
	Output        string
	Force         bool
	TargetPort    int
	NodePort      int
	// contains filtered or unexported fields
}

func (DeployConfig) Configure

func (c DeployConfig) Configure(f *dubbo.Dubbo)

func (*DeployConfig) Prompt

func (c *DeployConfig) Prompt(d *dubbo.Dubbo) (*DeployConfig, error)

func (DeployConfig) Validate

func (c DeployConfig) Validate(cmd *cobra.Command) (err error)

type ErrInvalidRuntime

type ErrInvalidRuntime error

ErrInvalidRuntime indicates that the passed language runtime was invalid.

type ErrInvalidTemplate

type ErrInvalidTemplate error

ErrInvalidTemplate indicates that the passed template was invalid.

type ErrNoRuntime

type ErrNoRuntime error

ErrNoRuntime indicates that the language runtime flag was not passed.

type ManifestDiffArgs

type ManifestDiffArgs struct {
	CompareDir bool
}

type ManifestGenerateArgs

type ManifestGenerateArgs struct {
	FileNames    []string
	ChartsPath   string
	ProfilesPath string
	OutputPath   string
	SetFlags     []string
}

type ManifestInstallArgs

type ManifestInstallArgs struct {
	ManifestGenerateArgs
	KubeConfigPath string
	// selected cluster info of kubeconfig
	Context string
}

type ManifestUninstallArgs

type ManifestUninstallArgs struct {
	ManifestGenerateArgs
	KubeConfigPath string
	// selected cluster info of kubeconfig
	Context string
}

type ProfileDiffArgs

type ProfileDiffArgs struct {
	ProfilesPath string
}

type ProfileListArgs

type ProfileListArgs struct {
	ProfilesPath string
}

type ProxyConfig

type ProxyConfig struct {
	ComponentManager         component.Manager
	BootstrapDynamicMetadata map[string]string
	Config                   *dubboctl.Config
	BootstrapGenerator       envoy.BootstrapConfigFactoryFunc
	DataplaneTokenGenerator  func(cfg *dubboctl.Config) (component.Component, error)
	LogLevel                 log.LogLevel
}

func DefaultProxyConfig

func DefaultProxyConfig() *ProxyConfig

type ResourceType

type ResourceType string

type RootCommandConfig

type RootCommandConfig struct {
	Name      string
	NewClient ClientFactory
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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