Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
keep the good bits
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbelvin committed Jan 27, 2020
1 parent e2f912f commit ebdfdaa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
3 changes: 1 addition & 2 deletions cmd/keytransparency-sequencer/main.go
Expand Up @@ -170,7 +170,6 @@ func main() {
grpc_prometheus.Register(grpcServer)
grpc_prometheus.EnableHandlingTimeHistogram()

// Run servers
g, gctx := errgroup.WithContext(ctx)
g.Go(func() error { return serverutil.ServeHTTPMetrics(*metricsAddr, serverutil.Readyz(sqldb)) })
g.Go(func() error {
Expand All @@ -179,7 +178,7 @@ func main() {
})
go runSequencer(gctx, conn, directoryStorage)

glog.Errorf("Signer exiting: %v", g.Wait())
glog.Errorf("Sequencer exiting: %v", g.Wait())
}

func runSequencer(ctx context.Context, conn *grpc.ClientConn, directoryStorage dir.Storage) {
Expand Down
7 changes: 0 additions & 7 deletions cmd/keytransparency-server/main.go
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/google/trillian/monitoring/prometheus"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/reflection"

"github.com/google/keytransparency/cmd/serverutil"
Expand Down Expand Up @@ -67,11 +66,6 @@ func main() {
}
defer sqldb.Close()

creds, err := credentials.NewServerTLSFromFile(*certFile, *keyFile)
if err != nil {
glog.Exitf("Failed to load server credentials %v", err)
}

authz := &authorization.AuthzPolicy{}
var authFunc grpc_auth.AuthFunc
switch *authType {
Expand Down Expand Up @@ -115,7 +109,6 @@ func main() {
ksvr := keyserver.New(tlog, tmap, entry.IsValidEntry, directories, logs, logs,
prometheus.MetricFactory{}, int32(*revisionPageSize))
grpcServer := grpc.NewServer(
grpc.Creds(creds),
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
grpc_prometheus.StreamServerInterceptor,
authorization.StreamServerInterceptor(map[string]authorization.AuthPair{
Expand Down
2 changes: 1 addition & 1 deletion cmd/serverutil/healthz.go
Expand Up @@ -21,7 +21,7 @@ func Healthz() http.HandlerFunc { return healthz }

func healthz(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("ok"))
w.Write([]byte("ok\n"))
}

// RootHeaalthHandler handles liveness checks at "/".
Expand Down
1 change: 1 addition & 0 deletions cmd/serverutil/readyz.go
Expand Up @@ -27,5 +27,6 @@ func Readyz(db *sql.DB) http.HandlerFunc {
return
}
w.WriteHeader(http.StatusOK)
w.Write([]byte("ok\n"))
}
}

0 comments on commit ebdfdaa

Please sign in to comment.