options

package
v0.3.5-beta3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store = &RuntimeStore{}

Functions

func GetCustomizeKtConfig added in v0.3.5

func GetCustomizeKtConfig() (string, bool)

func GetCustomizeKubeConfig added in v0.3.5

func GetCustomizeKubeConfig() (string, bool)

func SetOptions added in v0.3.5

func SetOptions(cmd *cobra.Command, flags *flag.FlagSet, optionStore any, config []OptionConfig)

Types

type CleanOptions

type CleanOptions struct {
	DryRun           bool
	ThresholdInMinus int64
	LocalOnly        bool
	SweepLocalRoute  bool
}

CleanOptions ...

type ConfigOptions added in v0.3.5

type ConfigOptions struct {
}

ConfigOptions ...

type ConnectOptions

type ConnectOptions struct {
	Global           bool
	DisablePodIp     bool
	DisableTunDevice bool
	DisableTunRoute  bool
	ProxyPort        int
	DnsPort          int
	DnsCacheTtl      int
	IncludeIps       string
	ExcludeIps       string
	Mode             string
	DnsMode          string
	ShareShadow      bool
	ClusterDomain    string
	SkipCleanup      bool
}

ConnectOptions ...

type DaemonOptions

type DaemonOptions struct {
	Connect  *ConnectOptions
	Exchange *ExchangeOptions
	Mesh     *MeshOptions
	Preview  *PreviewOptions
	Recover  *RecoverOptions
	Clean    *CleanOptions
	Config   *ConfigOptions
	Global   *GlobalOptions
}

DaemonOptions cli options

func Get

func Get() *DaemonOptions

Get fetch options instance

type ExchangeOptions

type ExchangeOptions struct {
	Mode            string
	Expose          string
	RecoverWaitTime int
}

ExchangeOptions ...

type GlobalOptions added in v0.3.5

type GlobalOptions struct {
	AsWorker            bool
	Kubeconfig          string
	Namespace           string
	ServiceAccount      string
	Debug               bool
	Image               string
	ImagePullSecret     string
	NodeSelector        string
	WithLabel           string
	WithAnnotation      string
	PortForwardTimeout  int
	PodCreationTimeout  int
	UseShadowDeployment bool
	ForceUpdate         bool
	UseLocalTime        bool
	Context             string
	PodQuota            string
}

GlobalOptions ...

type MeshOptions

type MeshOptions struct {
	Mode        string
	Expose      string
	VersionMark string
	RouterImage string
}

MeshOptions ...

type OptionConfig added in v0.3.5

type OptionConfig struct {
	Target       string
	Alias        string
	DefaultValue any
	Description  string
	Hidden       bool
	Required     bool
}

func CleanFlags added in v0.3.5

func CleanFlags() []OptionConfig

func ConfigFlags added in v0.3.5

func ConfigFlags() []OptionConfig

func ConnectFlags added in v0.3.5

func ConnectFlags() []OptionConfig

func ExchangeFlags added in v0.3.5

func ExchangeFlags() []OptionConfig

func GlobalFlags added in v0.3.5

func GlobalFlags() []OptionConfig

func MeshFlags added in v0.3.5

func MeshFlags() []OptionConfig

func PreviewFlags added in v0.3.5

func PreviewFlags() []OptionConfig

func RecoverFlags added in v0.3.5

func RecoverFlags() []OptionConfig

type PreviewOptions

type PreviewOptions struct {
	External bool
	Expose   string
}

PreviewOptions ...

type RecoverOptions added in v0.3.5

type RecoverOptions struct {
}

RecoverOptions ...

type RuntimeStore added in v0.3.5

type RuntimeStore struct {
	// Clientset for kubernetes operation
	Clientset kubernetes.Interface
	// RestConfig kubectl config
	RestConfig *rest.Config
	// Version ktctl version
	Version string
	// Component current sub-command (connect, exchange, mesh or preview)
	Component string
	// Shadow pod name
	Shadow string
	// Router pod name
	Router string
	// Mesh version of mesh pod
	Mesh string
	// Origin the origin deployment or service name
	Origin string
	// Replicas the origin replicas
	Replicas int32
	// Service exposed service name
	Service string
}

RuntimeStore ...

Jump to

Keyboard shortcuts

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