Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntryForwarder ¶
type EntryManager ¶
type EntryManager struct { EntryForwarder // contains filtered or unexported fields }
EntryManager handles forwarding entries and keeping track of forwarded ports and resources.
func NewEntryManager ¶
func NewEntryManager(out io.Writer, cli *kubectl.CLI) EntryManager
NewEntryManager returns a new port forward entry manager to keep track of forwarded ports and resources
func (*EntryManager) Stop ¶
func (b *EntryManager) Stop()
Stop terminates all kubectl port-forward commands.
func (*EntryManager) Terminate ¶
func (b *EntryManager) Terminate(p *portForwardEntry)
Terminate terminates a single port forward entry
type ForwarderManager ¶
type ForwarderManager struct { EntryForwarder Forwarders []Forwarder // contains filtered or unexported fields }
ForwarderManager manages all forwarders
func NewForwarderManager ¶
func NewForwarderManager(out io.Writer, cli *kubectl.CLI, podSelector kubernetes.PodSelector, labelSelector string, namespaces []string, opts config.PortForwardOptions, userDefined []*latest.PortForwardResource) *ForwarderManager
NewForwarderManager returns a new port manager which handles starting and stopping port forwarding
func (*ForwarderManager) Start ¶
func (p *ForwarderManager) Start(ctx context.Context) error
Start begins all forwarders managed by the ForwarderManager
func (*ForwarderManager) Stop ¶
func (p *ForwarderManager) Stop()
Stop cleans up and terminates all forwarders managed by the ForwarderManager
type KubectlForwarder ¶
type KubectlForwarder struct {
// contains filtered or unexported fields
}
func NewKubectlForwarder ¶ added in v0.37.0
func NewKubectlForwarder(out io.Writer, cli *kubectl.CLI) *KubectlForwarder
NewKubectlForwarder returns a new KubectlForwarder
func (*KubectlForwarder) Forward ¶
func (k *KubectlForwarder) Forward(parentCtx context.Context, pfe *portForwardEntry)
Forward port-forwards a pod using kubectl port-forward in the background It kills the command on errors in the kubectl port-forward log It restarts the command if it was not cancelled by skaffold It retries in case the port is taken
func (*KubectlForwarder) Terminate ¶
func (*KubectlForwarder) Terminate(p *portForwardEntry)
Terminate terminates an existing kubectl port-forward command using SIGTERM
type ResourceForwarder ¶
type ResourceForwarder struct { EntryManager // contains filtered or unexported fields }
ResourceForwarder is responsible for forwarding user defined port forwarding resources and automatically forwarding services deployed by skaffold.
func NewResourceForwarder ¶
func NewResourceForwarder(em EntryManager, namespaces []string, label string, userDefinedResources []*latest.PortForwardResource) *ResourceForwarder
NewResourceForwarder returns a struct that tracks and port-forwards pods as they are created and modified
type WatchingPodForwarder ¶
type WatchingPodForwarder struct { EntryManager // contains filtered or unexported fields }
WatchingPodForwarder is responsible for selecting pods satisfying a certain condition and port-forwarding the exposed container ports within those pods. It also tracks and manages the port-forward connections.
func NewWatchingPodForwarder ¶
func NewWatchingPodForwarder(em EntryManager, podSelector kubernetes.PodSelector, labelSelector string, namespaces []string) *WatchingPodForwarder
NewWatchingPodForwarder returns a struct that tracks and port-forwards pods as they are created and modified