Revision edecd39be2c60153554eb8b99b38fa25521b89ca authored by Andrey Velichkevich on 20 February 2019, 00:41:30 UTC, committed by Kubernetes Prow Robot on 20 February 2019, 00:41:30 UTC
* Delete modeldb from unit tests * Add library to interface test
1 parent c0f2f07
proxy.go
package main
import (
"flag"
"net/http"
"github.com/golang/glog"
"golang.org/x/net/context"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc"
gw "github.com/kubeflow/katib/pkg/api"
)
var (
vizierCoreEndpoint = flag.String("echo_endpoint", "vizier-core:6789", "vizier-core endpoint")
)
func run() error {
ctx := context.Background()
ctx, cancel := context.WithCancel(ctx)
defer cancel()
mux := runtime.NewServeMux()
opts := []grpc.DialOption{grpc.WithInsecure()}
// register handlers for the HTTP endpoints
err := gw.RegisterManagerHandlerFromEndpoint(ctx, mux, *vizierCoreEndpoint, opts)
if err != nil {
return err
}
// proxy server listens on port 80
return http.ListenAndServe(":80", mux)
}
func main() {
flag.Parse()
defer glog.Flush()
if err := run(); err != nil {
glog.Fatal(err)
}
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...