Skip to content

Commit

Permalink
Merge pull request anthhub#4 from crandles/restconfig
Browse files Browse the repository at this point in the history
allow creation of forwarder with restclient.Config
  • Loading branch information
anthhub committed Dec 20, 2021
2 parents 1b6ddce + a9c959a commit 47c50bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 47c50bc

Please sign in to comment.