Documentation ¶
Index ¶
- func Command() *cobra.Command
- func LeaveCommand() *cobra.Command
- func PreviewURL(pu string) string
- func Result(r *connector.InterceptResult, err error) error
- func Run(ctx context.Context, sif State) error
- type Args
- func (a *Args) AddFlags(flags *pflag.FlagSet)
- func (a *Args) AutocompleteNamespace(cmd *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func (a *Args) GetMountPoint(ctx context.Context) (string, bool, error)
- func (a *Args) Run(cmd *cobra.Command, positional []string) error
- func (a *Args) ValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
- func (a *Args) Validate(cmd *cobra.Command, positional []string) error
- func (a *Args) ValidateDockerArgs() error
- type Info
- type Ingress
- type Mount
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LeaveCommand ¶
func PreviewURL ¶ added in v2.11.0
Types ¶
type Args ¶
type Args struct { Name string // Args[0] || `${Args[0]}-${--namespace}` // which depends on a combinationof --workload and --namespace AgentName string // --workload || Args[0] // only valid if !localOnly Namespace string // --namespace Port string // --port // only valid if !localOnly ServiceName string // --service // only valid if !localOnly LocalOnly bool // --local-only LocalMountPort uint16 // --local-mount-port EnvFile string // --env-file EnvJSON string // --env-json Mount string // --mount // "true", "false", or desired mount point // only valid if !localOnly MountSet bool // whether --mount was passed ToPod []string // --to-pod DockerRun bool // --docker-run DockerMount string // --docker-mount // where to mount in a docker container. Defaults to mount unless mount is "true" or "false". Cmdline []string // Args[1:] Mechanism string // --mechanism tcp MechanismArgs []string ExtendedInfo []byte DetailedOutput bool }
func (*Args) AutocompleteNamespace ¶
func (*Args) GetMountPoint ¶
func (*Args) ValidateDockerArgs ¶
type Info ¶ added in v2.11.0
type Info struct { ID string `json:"id,omitempty" yaml:"id,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Disposition string `json:"disposition,omitempty" yaml:"disposition,omitempty"` Message string `json:"message,omitempty" yaml:"message,omitempty"` WorkloadKind string `json:"workload_kind,omitempty" yaml:"workload_kind,omitempty"` TargetHost string `json:"target_host,omitempty" yaml:"target_host,omitempty"` TargetPort int32 `json:"target_port,omitempty" yaml:"target_port,omitempty"` ServicePortID string `json:"service_port_id,omitempty" yaml:"service_port_id,omitempty"` Environment map[string]string `json:"environment,omitempty" yaml:"environment,omitempty"` Mount *Mount `json:"mount,omitempty" yaml:"mount,omitempty"` HttpFilter []string `json:"http_filter,omitempty" yaml:"http_filter,omitempty"` Global bool `json:"global,omitempty" yaml:"global,omitempty"` PreviewURL string `json:"preview_url,omitempty" yaml:"preview_url,omitempty"` Ingress *Ingress `json:"ingress,omitempty" yaml:"ingress,omitempty"` }
type Ingress ¶ added in v2.11.0
type Ingress struct { Host string `json:"host,omitempty" yaml:"host,omitempty"` Port int32 `json:"port,omitempty" yaml:"port,omitempty"` UseTLS bool `json:"use_tls,omitempty" yaml:"use_tls,omitempty"` L5Host string `json:"l5host,omitempty" yaml:"l5host,omitempty"` }
func NewIngress ¶ added in v2.11.0
func NewIngress(ps *manager.PreviewSpec) *Ingress
type Mount ¶ added in v2.11.0
type Mount struct { LocalDir string `json:"local_dir,omitempty" yaml:"local_dir,omitempty"` RemoteDir string `json:"remote_dir,omitempty" yaml:"remote_dir,omitempty"` Error string `json:"error,omitempty" yaml:"error,omitempty"` PodIP string `json:"pod_ip,omitempty" yaml:"pod_ip,omitempty"` Port int32 `json:"port,omitempty" yaml:"port,omitempty"` Mounts []string `json:"mounts,omitempty" yaml:"mounts,omitempty"` }
Click to show internal directories.
Click to hide internal directories.