Documentation ¶
Index ¶
- Constants
- Variables
- func AppendKubeFlags(kubeFlags map[string]string, args []string) ([]string, error)
- func CheckTimeout(ctx context.Context, err error) error
- func ConfigFlags(flagMap map[string]string) (*genericclioptions.ConfigFlags, error)
- func ConfigLoader(ctx context.Context, flagMap map[string]string, kubeConfigData []byte) (clientcmd.ClientConfig, error)
- func CurrentContext(ctx context.Context, flagMap map[string]string, configBytes []byte) (string, string, *api.Context, error)
- func DisplayVersion() string
- func Executable() (string, error)
- func FreePortsTCP(count int) ([]*net.TCPAddr, error)
- func GetCluster(config api.Config, ctxName string) (*api.Cluster, error)
- func GetConfigFile(c context.Context) string
- func GetExe(ctx context.Context) string
- func GetInstallMechanism() (string, error)
- func GetMechanismFromPath(execPath string) (string, error)
- func InstallID(ctx context.Context) (string, error)
- func IsDaemon() bool
- func LoadEnvWithInto(lookupFunc func(key string) (string, bool), env any) (any, error)
- func MarshalJSON(value any) ([]byte, error)
- func NewClientConfig(ctx context.Context, configFlags *genericclioptions.ConfigFlags, ...) (clientcmd.ClientConfig, error)
- func ReloadDaemonLogLevel(c context.Context, root bool) error
- func ReplaceConfig(ctx context.Context, config Config)
- func RunError(err error) error
- func Semver() semver.Version
- func UnmarshalJSON(data []byte, into any, rejectUnknown bool) error
- func Version() string
- func WatchConfig(c context.Context, onReload func(context.Context) error) error
- func WithConfig(ctx context.Context, config Config) context.Context
- func WithEnsuredState(ctx context.Context, prolog Prolog, action, epilog Action) error
- func WithEnv(ctx context.Context, env *Env) context.Context
- func WithKubeExtension(ctx context.Context, cluster *api.Cluster, managerNamespace string) (context.Context, error)
- func WrapRecvErr(err error, msg string) error
- type Action
- type BaseConfig
- func (c *BaseConfig) Base() *BaseConfig
- func (c *BaseConfig) Cluster() *Cluster
- func (c *BaseConfig) DNS() *DNS
- func (c *BaseConfig) DestructiveMerge(lc Config)
- func (c *BaseConfig) Grpc() *Grpc
- func (c *BaseConfig) Images() *Images
- func (c *BaseConfig) Intercept() *Intercept
- func (c *BaseConfig) LogLevels() *LogLevels
- func (c *BaseConfig) MarshalYAML() ([]byte, error)
- func (c *BaseConfig) Merge(lc Config) Config
- func (c *BaseConfig) OSSpecific() *OSSpecificConfig
- func (c *BaseConfig) Routing() *Routing
- func (c *BaseConfig) String() string
- func (c *BaseConfig) TelepresenceAPI() *TelepresenceAPI
- func (c *BaseConfig) Timeouts() *Timeouts
- type Cluster
- type Config
- type DNS
- type DNSMapping
- type DNSMappings
- type DNSSnake
- type DefaultsAware
- type DockerImage
- type Env
- type Grpc
- type Images
- func (img *Images) AgentImage(c context.Context) string
- func (img *Images) ClientImage(c context.Context) string
- func (img *Images) IsZero() bool
- func (img *Images) MarshalJSONV2(out *jsontext.Encoder, opts json.Options) error
- func (img *Images) Registry(c context.Context) string
- func (img *Images) UnmarshalJSONV2(in *jsontext.Decoder, opts json.Options) error
- func (img *Images) WebhookRegistry(_ context.Context) string
- type Intercept
- type Kubeconfig
- func DaemonKubeconfig(c context.Context, cr *connector.ConnectRequest) (context.Context, *Kubeconfig, error)
- func NewInClusterConfig(c context.Context, flagMap map[string]string) (*Kubeconfig, error)
- func NewKubeconfig(c context.Context, flagMap map[string]string, managerNamespaceOverride string) (context.Context, *Kubeconfig, error)
- func (kf *Kubeconfig) ContextServiceAndFlagsEqual(okf *Kubeconfig) bool
- func (kf *Kubeconfig) GetContext() string
- func (kf *Kubeconfig) GetRestConfig() *rest.Config
- func (kf *Kubeconfig) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (kf *Kubeconfig) ToRESTConfig() (*rest.Config, error)
- func (kf *Kubeconfig) ToRESTMapper() (meta.RESTMapper, error)
- func (kf *Kubeconfig) ToRawKubeConfigLoader() clientcmd.ClientConfig
- type KubeconfigGetter
- type LogLevels
- type OSSpecificConfig
- type OSSpecificEnv
- type Prolog
- type RecvEOFError
- type Routing
- type RoutingSnake
- type SessionConfig
- type Telemount
- type TelepresenceAPI
- type TimeoutID
- type Timeouts
- func (t *Timeouts) Get(timeoutID TimeoutID) time.Duration
- func (t *Timeouts) IsZero() bool
- func (t *Timeouts) MarshalJSONV2(out *jsontext.Encoder, opts json.Options) error
- func (t *Timeouts) TimeoutContext(ctx context.Context, timeoutID TimeoutID) (context.Context, context.CancelFunc)
- func (t *Timeouts) UnmarshalJSONV2(in *jsontext.Decoder, opts json.Options) error
Constants ¶
const (
// APIVersion is the API version of the daemon and connector API.
APIVersion = 3
)
const ConfigFile = "config.yml"
Variables ¶
var DefaultExcludeSuffixes = []string{
".com",
".io",
".net",
".org",
".ru",
}
var DisplayName = "Telepresence" //nolint:gochecknoglobals // extension point
var GetDefaultConfigFunc = func() Config { return GetDefaultBaseConfig() }
var ProcessName = func() string { const fg = "-foreground" a := os.Args var pn string switch { case len(a) > 2 && a[1] == "help": pn = a[2] case len(a) > 1: pn = a[1] default: pn = filepath.Base(a[0]) if runtime.GOOS == "windows" { pn = strings.TrimSuffix(pn, ".exe") } } return strings.TrimSuffix(pn, fg) }
Functions ¶
func AppendKubeFlags ¶ added in v2.17.0
AppendKubeFlags appends the flags in the given map to the given slice in the form of flag arguments suitable for command execution. Flags known to be multivalued are assumed to be in the form of comma-separated list and will be added using repeated options.
func ConfigFlags ¶ added in v2.12.0
func ConfigFlags(flagMap map[string]string) (*genericclioptions.ConfigFlags, error)
func ConfigLoader ¶ added in v2.16.0
func ConfigLoader(ctx context.Context, flagMap map[string]string, kubeConfigData []byte) (clientcmd.ClientConfig, error)
ConfigLoader returns the name of the current Kubernetes context, and the context itself.
func CurrentContext ¶ added in v2.12.0
func CurrentContext(ctx context.Context, flagMap map[string]string, configBytes []byte) (string, string, *api.Context, error)
CurrentContext returns the name of the current Kubernetes context, the active namespace, and the context itself.
func DisplayVersion ¶
func DisplayVersion() string
DisplayVersion returns a printable version for `telepresence`.
func Executable ¶ added in v2.5.0
func FreePortsTCP ¶ added in v2.21.0
FreePortsTCP uses net.Listen repeatedly to choose free TCP ports for the localhost. It then immediately closes the listeners and returns the addresses that were allocated.
NOTE: Since the listeners are closed, there's a chance that someone else might allocate the returned addresses before they are actually used. The chances are slim though, since tests show that in most cases (at least on macOS and Linux), the same address isn't allocated for a while even if the allocation is made from different processes.
func GetCluster ¶ added in v2.21.0
func GetConfigFile ¶ added in v2.3.5
GetConfigFile gets the path to the configFile as stored in filelocation.AppUserConfigDir.
func GetInstallMechanism ¶ added in v2.4.8
GetInstallMechanism returns how the executable was installed on the machine.
func GetMechanismFromPath ¶ added in v2.4.8
GetMechanismFromPath is a helper function that contains most of the logic required for GetInstallMechanism, but enables us to test it since we can control the path passed in.
func LoadEnvWithInto ¶ added in v2.14.1
func MarshalJSON ¶ added in v2.21.0
func NewClientConfig ¶ added in v2.19.0
func NewClientConfig(ctx context.Context, configFlags *genericclioptions.ConfigFlags, configData []byte) (clientcmd.ClientConfig, error)
NewClientConfig creates a clientcmd.ClientConfig, by either reading the kubeconfig from the given configData or by loading it from files as configured by the given configFlags.
func ReloadDaemonLogLevel ¶ added in v2.21.0
ReloadDaemonLogLevel calls SetLevel with the log level defined for the rootDaemon or userDaemon depending on the root flag. Assumes that the config has already been reloaded.
func ReplaceConfig ¶ added in v2.5.0
ReplaceConfig replaces the config last stored using WithConfig with the given Config.
func RunError ¶
RunError checks if the given err is a *exit.ExitError, and if so, extracts Stderr and the ExitCode from it.
func UnmarshalJSON ¶ added in v2.21.0
func WatchConfig ¶ added in v2.21.0
WatchConfig uses a file system watcher that receives events when the configuration changes and calls the given function when that happens.
func WithConfig ¶ added in v2.4.2
WithConfig returns a context with the given Config.
func WithEnsuredState ¶
WithEnsuredState calls prolog, and if that was successful, calls act. If epilog is not nil, it is guaranteed to be called when prolog returns true.
func WithKubeExtension ¶ added in v2.21.0
func WrapRecvErr ¶ added in v2.3.3
WrapRecvErr wraps an error from a Recv call. If the error is nil, nil is returned. If the error indicates that the remote end has , a RecvEOFError wrapping the error will be returned. Otherwise, the original error will be wrapped as fmt.Errorf("%s: %w", msg, err).
Types ¶
type BaseConfig ¶ added in v2.14.1
type BaseConfig struct { OSSpecificConfig `` TimeoutsV Timeouts `json:"timeouts,omitzero"` LogLevelsV LogLevels `json:"logLevels,omitzero"` ImagesV Images `json:"images,omitzero"` GrpcV Grpc `json:"grpc,omitzero"` TelepresenceAPIV TelepresenceAPI `json:"telepresenceAPI,omitzero"` InterceptV Intercept `json:"intercept,omitzero"` ClusterV Cluster `json:"cluster,omitzero"` DNSV DNS `json:"dns,omitzero"` RoutingV Routing `json:"routing,omitzero"` // This is actually a traffic-manager setting, and controls // the agent's connection to the client. DummyConnectionTTL time.Duration `json:"connectionTTL,omitzero"` }
BaseConfig contains all configuration values for the telepresence CLI.
func GetDefaultBaseConfig ¶ added in v2.14.1
func GetDefaultBaseConfig() *BaseConfig
GetDefaultBaseConfig returns the default configuration settings.
func (*BaseConfig) Base ¶ added in v2.14.1
func (c *BaseConfig) Base() *BaseConfig
func (*BaseConfig) Cluster ¶ added in v2.14.1
func (c *BaseConfig) Cluster() *Cluster
func (*BaseConfig) DNS ¶ added in v2.21.0
func (c *BaseConfig) DNS() *DNS
func (*BaseConfig) DestructiveMerge ¶ added in v2.21.0
func (c *BaseConfig) DestructiveMerge(lc Config)
DestructiveMerge merges this instance with the non-zero values of the given argument. The argument values take priority.
func (*BaseConfig) Grpc ¶ added in v2.14.1
func (c *BaseConfig) Grpc() *Grpc
func (*BaseConfig) Images ¶ added in v2.14.1
func (c *BaseConfig) Images() *Images
func (*BaseConfig) Intercept ¶ added in v2.14.1
func (c *BaseConfig) Intercept() *Intercept
func (*BaseConfig) LogLevels ¶ added in v2.14.1
func (c *BaseConfig) LogLevels() *LogLevels
func (*BaseConfig) MarshalYAML ¶ added in v2.21.0
func (c *BaseConfig) MarshalYAML() ([]byte, error)
func (*BaseConfig) Merge ¶ added in v2.14.1
func (c *BaseConfig) Merge(lc Config) Config
func (*BaseConfig) OSSpecific ¶ added in v2.14.1
func (c *BaseConfig) OSSpecific() *OSSpecificConfig
func (*BaseConfig) Routing ¶ added in v2.21.0
func (c *BaseConfig) Routing() *Routing
func (*BaseConfig) String ¶ added in v2.14.1
func (c *BaseConfig) String() string
func (*BaseConfig) TelepresenceAPI ¶ added in v2.14.1
func (c *BaseConfig) TelepresenceAPI() *TelepresenceAPI
func (*BaseConfig) Timeouts ¶ added in v2.14.1
func (c *BaseConfig) Timeouts() *Timeouts
type Cluster ¶ added in v2.11.0
type Cluster struct { DefaultManagerNamespace string `json:"defaultManagerNamespace"` MappedNamespaces []string `json:"mappedNamespaces"` ConnectFromRootDaemon bool `json:"connectFromRootDaemon"` ForceSPDY bool `json:"forceSPDY"` AgentPortForward bool `json:"agentPortForward"` // deprecated, use Routing.VirtualSubnet OldVirtualIPSubnet string `json:"virtualIPSubnet"` }
func (*Cluster) IsZero ¶ added in v2.11.0
IsZero controls whether this element will be included in marshalled output.
func (*Cluster) MarshalJSONV2 ¶ added in v2.21.0
type Config ¶ added in v2.1.2
type Config interface { fmt.Stringer MarshalYAML() ([]byte, error) OSSpecific() *OSSpecificConfig Base() *BaseConfig Timeouts() *Timeouts LogLevels() *LogLevels Images() *Images Grpc() *Grpc TelepresenceAPI() *TelepresenceAPI Intercept() *Intercept Cluster() *Cluster DNS() *DNS Routing() *Routing DestructiveMerge(Config) Merge(priority Config) Config }
func GetDefaultConfig ¶ added in v2.4.2
func GetDefaultConfig() Config
GetDefaultConfig returns the default configuration settings.
func LoadConfig ¶ added in v2.4.2
LoadConfig loads and returns the Telepresence configuration as stored in filelocation.AppUserConfigDir or filelocation.AppSystemConfigDirs.
func ParseConfigYAML ¶ added in v2.13.0
type DNS ¶ added in v2.9.0
type DNS struct { Error string `json:"error"` LocalIP netip.Addr `json:"localIP"` RemoteIP netip.Addr `json:"remoteIP"` IncludeSuffixes []string `json:"includeSuffixes"` ExcludeSuffixes []string `json:"excludeSuffixes"` Excludes []string `json:"excludes"` Mappings DNSMappings `json:"mappings"` LookupTimeout time.Duration `json:"lookupTimeout"` }
func DNSFromRPC ¶ added in v2.21.0
func (*DNS) IsZero ¶ added in v2.21.0
IsZero controls whether this element will be included in marshalled output.
func (*DNS) MarshalJSONV2 ¶ added in v2.21.0
type DNSMapping ¶ added in v2.14.0
type DNSMapping struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` AliasFor string `json:"aliasFor,omitempty" yaml:"aliasFor,omitempty"` }
DNSMapping contains a hostname and its associated alias. When requesting the name, the intended behavior is to resolve the alias instead.
type DNSMappings ¶ added in v2.14.0
type DNSMappings []*DNSMapping
func MappingsFromRPC ¶ added in v2.21.0
func MappingsFromRPC(mappings []*daemon.DNSMapping) DNSMappings
func (*DNSMappings) FromRPC ¶ added in v2.14.0
func (d *DNSMappings) FromRPC(rpcMappings []*rpc.DNSMapping)
func (DNSMappings) ToRPC ¶ added in v2.14.0
func (d DNSMappings) ToRPC() []*rpc.DNSMapping
type DNSSnake ¶ added in v2.9.0
type DNSSnake struct { Error string `json:"error"` LocalIP netip.Addr `json:"local_ip"` RemoteIP netip.Addr `json:"remote_ip"` IncludeSuffixes []string `json:"include_suffixes"` ExcludeSuffixes []string `json:"exclude_suffixes"` Excludes []string `json:"excludes"` Mappings DNSMappings `json:"mappings"` LookupTimeout time.Duration `json:"lookup_timeout"` }
DNSSnake is the same as DNS but with snake_case json/yaml names.
type DefaultsAware ¶ added in v2.21.0
type DockerImage ¶ added in v2.19.0
type Env ¶
type Env struct { OSSpecificEnv ManagerNamespace string `env:"TELEPRESENCE_MANAGER_NAMESPACE, parser=nonempty-string"` // This environment variable becomes the default for the images.registry and images.webhookRegistry Registry string `env:"TELEPRESENCE_REGISTRY, parser=possibly-empty-string,default="` // This environment variable becomes the default for the images.agentImage and images.webhookAgentImage AgentImage string `env:"TELEPRESENCE_AGENT_IMAGE, parser=possibly-empty-string,default="` // This environment variable becomes the default for the images.clientImage ClientImage string `env:"TELEPRESENCE_CLIENT_IMAGE, parser=possibly-empty-string,default="` // The address that the user daemon is listening to (unless it is started by the client and uses a named pipe or unix socket). UserDaemonAddress string `env:"TELEPRESENCE_USER_DAEMON_ADDRESS, parser=possibly-empty-string,default="` ScoutDisable bool `env:"SCOUT_DISABLE, parser=strconv.ParseBool, default=0"` }
type Grpc ¶ added in v2.3.5
type Grpc struct { // MaxReceiveSize is the maximum message size in bytes the client can receive in a gRPC call or stream message. // Overrides the gRPC default of 4MB. MaxReceiveSizeV resource.Quantity `json:"maxReceiveSize"` }
func (*Grpc) IsZero ¶ added in v2.14.1
IsZero controls whether this element will be included in marshalled output.
func (*Grpc) MaxReceiveSize ¶ added in v2.3.5
type Images ¶ added in v2.3.5
type Images struct { PrivateRegistry string `json:"registry"` PrivateAgentImage string `json:"agentImage"` PrivateClientImage string `json:"clientImage"` PrivateWebhookRegistry string `json:"webhookRegistry"` }
func (*Images) ClientImage ¶ added in v2.17.0
func (*Images) IsZero ¶ added in v2.14.1
IsZero controls whether this element will be included in marshalled output.
func (*Images) MarshalJSONV2 ¶ added in v2.21.0
func (*Images) UnmarshalJSONV2 ¶ added in v2.21.0
type Intercept ¶ added in v2.4.10
type Intercept struct { AppProtocolStrategy k8sapi.AppProtocolStrategy `json:"appProtocolStrategy"` DefaultPort int `json:"defaultPort"` UseFtp bool `json:"useFtp"` Telemount Telemount `json:"telemount,omitzero"` }
func (*Intercept) IsZero ¶ added in v2.5.0
IsZero controls whether this element will be included in marshalled output.
func (*Intercept) MarshalJSONV2 ¶ added in v2.21.0
type Kubeconfig ¶ added in v2.9.0
type Kubeconfig struct { Namespace string // default cluster namespace. Context string Server string OriginalFlagMap map[string]string EffectiveFlagMap map[string]string ClientConfig clientcmd.ClientConfig RestConfig *rest.Config }
Kubeconfig implements genericclioptions.RESTClientGetter, but is using the RestConfig instead of the ConfigFlags (which also implements that interface) since the latter will assume that the kubeconfig is loaded from disk.
func DaemonKubeconfig ¶ added in v2.12.0
func DaemonKubeconfig(c context.Context, cr *connector.ConnectRequest) (context.Context, *Kubeconfig, error)
func NewInClusterConfig ¶ added in v2.9.0
NewInClusterConfig represents an inClusterConfig.
func NewKubeconfig ¶ added in v2.9.0
func (*Kubeconfig) ContextServiceAndFlagsEqual ¶ added in v2.9.0
func (kf *Kubeconfig) ContextServiceAndFlagsEqual(okf *Kubeconfig) bool
ContextServiceAndFlagsEqual determines if this instance is equal to the given instance with respect to context, server, and flag arguments.
func (*Kubeconfig) GetContext ¶ added in v2.12.0
func (kf *Kubeconfig) GetContext() string
func (*Kubeconfig) GetRestConfig ¶ added in v2.9.0
func (kf *Kubeconfig) GetRestConfig() *rest.Config
func (*Kubeconfig) ToDiscoveryClient ¶ added in v2.19.0
func (kf *Kubeconfig) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*Kubeconfig) ToRESTConfig ¶ added in v2.19.0
func (kf *Kubeconfig) ToRESTConfig() (*rest.Config, error)
func (*Kubeconfig) ToRESTMapper ¶ added in v2.19.0
func (kf *Kubeconfig) ToRESTMapper() (meta.RESTMapper, error)
func (*Kubeconfig) ToRawKubeConfigLoader ¶ added in v2.19.0
func (kf *Kubeconfig) ToRawKubeConfigLoader() clientcmd.ClientConfig
type KubeconfigGetter ¶ added in v2.19.0
type LogLevels ¶ added in v2.3.0
type LogLevels struct { UserDaemon logrus.Level `json:"userDaemon"` RootDaemon logrus.Level `json:"rootDaemon"` }
func (*LogLevels) IsZero ¶ added in v2.5.0
IsZero controls whether this element will be included in marshalled output.
func (*LogLevels) MarshalJSONV2 ¶ added in v2.21.0
type OSSpecificConfig ¶ added in v2.13.2
type OSSpecificConfig struct{}
func GetDefaultOSSpecificConfig ¶ added in v2.13.2
func GetDefaultOSSpecificConfig() OSSpecificConfig
func (*OSSpecificConfig) Merge ¶ added in v2.13.2
func (c *OSSpecificConfig) Merge(o *OSSpecificConfig)
type OSSpecificEnv ¶ added in v2.12.0
type OSSpecificEnv struct {
Shell string `env:"SHELL, parser=nonempty-string,default=/bin/bash"`
}
type RecvEOFError ¶ added in v2.8.0
type RecvEOFError struct {
// contains filtered or unexported fields
}
RecvEOFError should be returned when a component has returned EOF from a stream. Do not use this if, for example, the initial dial to a stream fails.
func (*RecvEOFError) Error ¶ added in v2.8.0
func (e *RecvEOFError) Error() string
func (*RecvEOFError) Unwrap ¶ added in v2.8.0
func (e *RecvEOFError) Unwrap() error
type Routing ¶ added in v2.9.0
type Routing struct { Subnets []netip.Prefix `json:"subnets,omitempty"` AlsoProxy []netip.Prefix `json:"alsoProxySubnets,omitempty"` NeverProxy []netip.Prefix `json:"neverProxySubnets,omitempty"` AllowConflicting []netip.Prefix `json:"allowConflictingSubnets,omitempty"` RecursionBlockDuration time.Duration `json:"recursionBlockDuration,omitempty"` VirtualSubnet netip.Prefix `json:"virtualSubnet"` AutoResolveConflicts bool `json:"autoResolveConflicts"` // For backward compatibility. OldAlsoProxy []netip.Prefix `json:"alsoProxy,omitempty"` OldNeverProxy []netip.Prefix `json:"neverProxy,omitempty"` OldAllowConflicting []netip.Prefix `json:"allowConflicting,omitempty"` }
func (*Routing) IsZero ¶ added in v2.21.0
IsZero controls whether this element will be included in marshalled output.
func (*Routing) MarshalJSONV2 ¶ added in v2.21.0
func (*Routing) ToSnake ¶ added in v2.21.0
func (r *Routing) ToSnake() *RoutingSnake
type RoutingSnake ¶ added in v2.9.0
type RoutingSnake struct { Subnets []netip.Prefix `json:"subnets"` AlsoProxy []netip.Prefix `json:"also_proxy_subnets"` NeverProxy []netip.Prefix `json:"never_proxy_subnets"` AllowConflicting []netip.Prefix `json:"allow_conflicting_subnets"` RecursionBlockDuration time.Duration `json:"recursion_block_duration"` VirtualSubnet netip.Prefix `json:"virtual_subnet"` AutoResolveConflicts bool `json:"auto_resolve_conflicts"` }
RoutingSnake is the same as Routing but with snake_case json/yaml names.
type SessionConfig ¶ added in v2.9.0
func (*SessionConfig) UnmarshalJSON ¶ added in v2.14.1
func (sc *SessionConfig) UnmarshalJSON(data []byte) error
type Telemount ¶ added in v2.21.0
type Telemount DockerImage
func (*Telemount) MarshalJSONV2 ¶ added in v2.21.0
type TelepresenceAPI ¶ added in v2.4.8
type TelepresenceAPI struct {
Port int `json:"port"`
}
type Timeouts ¶ added in v2.1.2
type Timeouts struct { // PrivateClusterConnect is the maximum time to wait for a connection to the cluster to be established PrivateClusterConnect time.Duration `json:"clusterConnect"` // PrivateConnectivityCheck timeout used when checking if the cluster is already proxied on the workstation PrivateConnectivityCheck time.Duration `json:"connectivityCheck"` // PrivateEndpointDial is how long to wait for a Dial to a service for which the IP is known. PrivateEndpointDial time.Duration `json:"endpointDial"` // PrivateHelm is how long to wait for any helm operation. PrivateHelm time.Duration `json:"helm"` // PrivateIntercept is the time to wait for an intercept after the agents has been installed PrivateIntercept time.Duration `json:"intercept"` // PrivateRoundtripLatency is how much to add to the EndpointDial timeout when establishing a remote connection. PrivateRoundtripLatency time.Duration `json:"roundtripLatency"` // PrivateProxyDial is how long to wait for the proxy to establish an outbound connection PrivateProxyDial time.Duration `json:"proxyDial"` // PrivateTrafficManagerConnect is how long to wait for the traffic-manager API to connect PrivateTrafficManagerAPI time.Duration `json:"trafficManagerAPI"` // PrivateTrafficManagerConnect is how long to wait for the initial port-forwards to the traffic-manager PrivateTrafficManagerConnect time.Duration `json:"trafficManagerConnect"` // PrivateFtpReadWrite read/write timeout used by the fuseftp client. PrivateFtpReadWrite time.Duration `json:"ftpReadWrite"` // PrivateFtpShutdown max time to wait for the fuseftp client to complete pending operations before forcing termination. PrivateFtpShutdown time.Duration `json:"ftpShutdown"` // PrivateContainerShutdown max time to wait for a docker container to stop before forcing termination. PrivateContainerShutdown time.Duration `json:"containerShutdown"` }
func (*Timeouts) IsZero ¶ added in v2.5.0
IsZero controls whether this element will be included in marshalled output.
func (*Timeouts) MarshalJSONV2 ¶ added in v2.21.0
func (*Timeouts) TimeoutContext ¶ added in v2.3.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
output
Package output provides structured output for *cobra.Command.
|
Package output provides structured output for *cobra.Command. |
Package docker contains the functions necessary to start or discover a Telepresence daemon running in a docker container.
|
Package docker contains the functions necessary to start or discover a Telepresence daemon running in a docker container. |