Documentation ¶
Index ¶
- type HostFileWithLock
- type HostsParams
- type PortForwardOpts
- func (pfo *PortForwardOpts) AddHosts()
- func (pfo *PortForwardOpts) ListenUntilPodDeleted(stopChannel <-chan struct{}, pod *v1.Pod)
- func (pfo *PortForwardOpts) PortForward() error
- func (pfo *PortForwardOpts) Stop()
- func (pfo *PortForwardOpts) WaitUntilPodRunning(stopChannel <-chan struct{}) (*v1.Pod, error)
- type ServiceFWD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostFileWithLock ¶ added in v1.13.1
HostFileWithLock
type HostsParams ¶ added in v1.13.1
type HostsParams struct {
// contains filtered or unexported fields
}
HostsParams
type PortForwardOpts ¶
type PortForwardOpts struct { Out *fwdpub.Publisher Config restclient.Config ClientSet kubernetes.Clientset RESTClient restclient.RESTClient Service string ServiceFwd ServiceFWD PodName string PodPort string LocalIp net.IP LocalPort string HostFile *HostFileWithLock // Context is a unique key (string) in kubectl config representing // a user/cluster combination. Kubefwd uses context as the // cluster name when forwarding to more than one cluster. Context string // Namespace is the current Kubernetes Namespace to locate services // and the pods that back them for port-forwarding Namespace string // ClusterN is the ordinal index of the cluster (from configuration) // cluster 0 is considered local while > 0 is remote ClusterN int // NamespaceN is the ordinal index of the namespace from the // perspective of the user. Namespace 0 is considered local // while > 0 is an external namespace NamespaceN int Domain string HostsParams *HostsParams Hosts []string ManualStopChan chan struct{} // Send a signal on this to stop the portforwarding DoneChan chan struct{} // Listen on this channel for when the shutdown is completed. }
PortForwardOpts
func (*PortForwardOpts) AddHosts ¶ added in v1.13.1
func (pfo *PortForwardOpts) AddHosts()
AddHosts adds hostname entries to /etc/hosts
func (*PortForwardOpts) ListenUntilPodDeleted ¶ added in v1.13.1
func (pfo *PortForwardOpts) ListenUntilPodDeleted(stopChannel <-chan struct{}, pod *v1.Pod)
listen for pod is deleted
func (*PortForwardOpts) PortForward ¶ added in v1.13.1
func (pfo *PortForwardOpts) PortForward() error
PortForward does the port-forward for a single pod. It is a blocking call and will return when an error occurred or after a cancellation signal has been received.
func (*PortForwardOpts) Stop ¶ added in v1.13.1
func (pfo *PortForwardOpts) Stop()
Stop sends the shutdown signal to the port-forwarding process. In case the shutdown signal was already given before, this is a no-op.
func (*PortForwardOpts) WaitUntilPodRunning ¶ added in v1.17.3
func (pfo *PortForwardOpts) WaitUntilPodRunning(stopChannel <-chan struct{}) (*v1.Pod, error)
Waiting for the pod running
type ServiceFWD ¶ added in v1.17.3
ServiceFWD PodSyncer interface is used to represent a fwdservice.ServiceFWD reference, which cannot be used directly due to circular imports. It's a reference from a pod to it's parent service.