Skip to content

Commit

Permalink
unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
MatousJobanek committed Oct 2, 2024
1 parent 861102f commit 9861657
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions pkg/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ import (
"github.com/labstack/echo/v4/middleware"
glog "github.com/labstack/gommon/log"
errs "github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/httpstream"

"k8s.io/apiserver/pkg/util/wsstream"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
)

const (
Expand Down Expand Up @@ -770,29 +766,6 @@ func singleJoiningSlash(a, b string) string {
return a + b
}

func newClusterClient() (client.Client, error) {
scheme := runtime.NewScheme()
if err := v1.AddToScheme(scheme); err != nil {
return nil, err
}
if err := toolchainv1alpha1.AddToScheme(scheme); err != nil {
return nil, err
}

k8sConfig, err := rest.InClusterConfig()
if err != nil {
return nil, err
}

cl, err := client.New(k8sConfig, client.Options{
Scheme: scheme,
})
if err != nil {
return nil, errs.Wrap(err, "cannot create ToolchainCluster client")
}
return cl, nil
}

var ph = textproto.CanonicalMIMEHeaderKey("Sec-WebSocket-Protocol")

func extractTokenFromWebsocketRequest(req *http.Request) (string, error) {
Expand Down

0 comments on commit 9861657

Please sign in to comment.