diff --git a/server/server.go b/server/server.go index bf2349e..a591a6c 100644 --- a/server/server.go +++ b/server/server.go @@ -18,6 +18,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" "golang.org/x/crypto/acme/autocert" "resenje.org/email" "resenje.org/recovery" @@ -83,8 +84,8 @@ func New(o Options) (s *Server, err error) { // register standard metrics s.metricsRegistry.MustRegister( - prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}), - prometheus.NewGoCollector(), + collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}), + collectors.NewGoCollector(), ) var certificates []tls.Certificate diff --git a/servers/grpc/grpc_test.go b/servers/grpc/grpc_test.go index 63ba2f2..4e58769 100644 --- a/servers/grpc/grpc_test.go +++ b/servers/grpc/grpc_test.go @@ -13,6 +13,7 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" "resenje.org/web/servers/grpc/internal/hello" ) @@ -41,7 +42,7 @@ func TestServer(t *testing.T) { } }() - conn, err := grpc.Dial(addr, grpc.WithInsecure()) + conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal(err) } @@ -82,7 +83,7 @@ func TestServerShutdown(t *testing.T) { } }() - conn, err := grpc.Dial(addr, grpc.WithInsecure()) + conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal(err) } @@ -132,7 +133,7 @@ func TestServerClose(t *testing.T) { } }() - conn, err := grpc.Dial(addr, grpc.WithInsecure()) + conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal(err) }