From a9c959a4fb6d9ace4fb6e84cd6700a60677267f5 Mon Sep 17 00:00:00 2001 From: Chris Randles Date: Tue, 30 Nov 2021 10:37:44 -0500 Subject: [PATCH] allow creation of forwarder with restclient.Config --- forwarder.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/forwarder.go b/forwarder.go index cbe7637..4f1dc3f 100644 --- a/forwarder.go +++ b/forwarder.go @@ -54,6 +54,11 @@ func WithForwarders(ctx context.Context, options []*Option, kubeconfigPath strin return forwarders(ctx, options, config) } +// It is to forward port with restclient.Config. +func WithRestConfig(ctx context.Context, options []*Option, config *restclient.Config) (*Result, error) { + return forwarders(ctx, options, config) +} + // It is to forward port for k8s cloud services. func forwarders(ctx context.Context, options []*Option, config *restclient.Config) (*Result, error) { newOptions, err := parseOptions(options)