add portforwarding support to node/api (#1102)

Co-authored-by: Pablo Borrelli <pablo.borrelli0@gmail.com>
Co-authored-by: windyear <1280027646@qq.com>
This commit is contained in:
Salvatore Cirone
2023-06-16 03:45:10 +02:00
committed by GitHub
parent 8205ee2889
commit 59fd7fddb6
10 changed files with 1097 additions and 1 deletions

View File

@@ -308,6 +308,12 @@ func (p *MockProvider) AttachToContainer(ctx context.Context, namespace, name, c
return nil
}
// PortForward forwards a local port to a port on the pod
func (p *MockProvider) PortForward(ctx context.Context, namespace, pod string, port int32, stream io.ReadWriteCloser) error {
log.G(ctx).Infof("receive PortForward %q", pod)
return nil
}
// GetPodStatus returns the status of a pod by name that is "running".
// returns nil if a pod by that name is not found.
func (p *MockProvider) GetPodStatus(ctx context.Context, namespace, name string) (*v1.PodStatus, error) {