options

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store = &RuntimeStore{}

Functions

func GetCustomizeKtConfig

func GetCustomizeKtConfig() (string, bool)

func GetCustomizeKubeConfig

func GetCustomizeKubeConfig() (string, bool)

func HideGlobalFlags

func HideGlobalFlags(cmd *cobra.Command)

func SetOptions

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

Types

type BirdseyeOptions

type BirdseyeOptions struct {
	SortBy             string
	ShowConnector      bool
	HideNaturalService bool
}

BirdseyeOptions ...

type CleanOptions

type CleanOptions struct {
	DryRun           bool
	ThresholdInMinus int64
	LocalOnly        bool
}

CleanOptions ...

type ConfigOptions

type ConfigOptions struct {
}

ConfigOptions ...

type ConnectOptions

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

ConnectOptions ...

type DaemonOptions

type DaemonOptions struct {
	Connect  *ConnectOptions
	Exchange *ExchangeOptions
	Mesh     *MeshOptions
	Preview  *PreviewOptions
	Forward  *ForwardOptions
	Recover  *RecoverOptions
	Clean    *CleanOptions
	Config   *ConfigOptions
	Birdseye *BirdseyeOptions
	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
	SkipPortChecking bool
}

ExchangeOptions ...

type ForwardOptions

type ForwardOptions struct {
}

ForwardOptions ...

type GlobalOptions

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
	ListenCheck         bool
	IpVersion           int
}

GlobalOptions ...

type MeshOptions

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

MeshOptions ...

type OptionConfig

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

func BirdseyeFlags

func BirdseyeFlags() []OptionConfig

func CleanFlags

func CleanFlags() []OptionConfig

func ConnectFlags

func ConnectFlags() []OptionConfig

func ExchangeFlags

func ExchangeFlags() []OptionConfig

func ForwardFlags

func ForwardFlags() []OptionConfig

func GlobalFlags

func GlobalFlags() []OptionConfig

func MeshFlags

func MeshFlags() []OptionConfig

func PreviewFlags

func PreviewFlags() []OptionConfig

func RecoverFlags

func RecoverFlags() []OptionConfig

type PreviewOptions

type PreviewOptions struct {
	External         bool
	Expose           string
	SkipPortChecking bool
}

PreviewOptions ...

type RecoverOptions

type RecoverOptions struct {
}

RecoverOptions ...

type RuntimeStore

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
	// isIpv6Cluster
	Ipv6Cluster bool
}

RuntimeStore ...

Jump to

Keyboard shortcuts

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