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 ¶
HostFileWithLock
type HostsParams ¶
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 ¶
func (pfo *PortForwardOpts) AddHosts()
AddHosts adds hostname entries to /etc/hosts
func (*PortForwardOpts) ListenUntilPodDeleted ¶
func (pfo *PortForwardOpts) ListenUntilPodDeleted(stopChannel <-chan struct{}, pod *v1.Pod)
listen for pod is deleted
func (*PortForwardOpts) PortForward ¶
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 ¶
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 ¶
func (pfo *PortForwardOpts) WaitUntilPodRunning(stopChannel <-chan struct{}) (*v1.Pod, error)
Waiting for the pod running
type ServiceFWD ¶
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.