cmd

package
v0.1.1-ee Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cmd provides function for command utility

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version represent current version of dmaas-operator, set during build
	Version string

	// GitSHA represent the latest commit from which dmaas-operator built, set during build
	GitSHA string

	// GitTreeState represent state of git tree, either "clean" or "dirty"
	GitTreeState string
)

Functions

func CheckError

func CheckError(err error)

CheckError verify the given error

func NewCmdServer

func NewCmdServer(c Config) *cobra.Command

NewCmdServer returns the command for server

func NewCmdVersion

func NewCmdVersion() *cobra.Command

NewCmdVersion creates the version command

func NewCommand

func NewCommand(name string) *cobra.Command

NewCommand returns the command for dmaas-operator

Types

type Config

type Config interface {
	// BindFlags binds common flags (--kubeconfig, --namespace) to the passed-in FlagSet.
	BindFlags(flags *pflag.FlagSet)

	// Client returns dmaas-operator client.
	Client() (clientset.Interface, error)

	// KubeClient returns Kubernetes client.
	KubeClient() (kubernetes.Interface, error)

	// VeleroClient return velero client.
	VeleroClient() (velero.Interface, error)

	// SetClientQPS sets the Queries Per Second for a client.
	SetClientQPS(float32) error

	// SetClientBurst sets the Burst for a client.
	SetClientBurst(int) error

	// GetNamespace return dmaas namespace
	GetNamespace() string
}

Config interface provides api to access clientset and namespace

func NewConfig

func NewConfig() Config

NewConfig return config for clientset

Jump to

Keyboard shortcuts

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