mirror of
https://github.com/rancher/norman.git
synced 2025-09-17 15:49:53 +00:00
17 lines
298 B
Go
17 lines
298 B
Go
package k8s
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/rancher/norman/pkg/remotedialer"
|
|
)
|
|
|
|
func newTunnel(authorizer remotedialer.Authorizer) http.Handler {
|
|
if authorizer == nil {
|
|
return nil
|
|
}
|
|
server := remotedialer.New(authorizer, remotedialer.DefaultErrorWriter)
|
|
setupK3s(server)
|
|
return server
|
|
}
|