Checkpoint: grpc auth fix, issuer list/detail, v2 protos, architecture docs
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -31,7 +31,7 @@ func init() {
|
||||
}
|
||||
|
||||
func run(cmd *cobra.Command, args []string) error {
|
||||
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
|
||||
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelDebug}))
|
||||
|
||||
configPath := cfgFile
|
||||
if configPath == "" {
|
||||
|
||||
@@ -95,18 +95,8 @@ func runServer(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
}()
|
||||
|
||||
if cfg.Server.GRPCAddr != "" {
|
||||
go func() {
|
||||
if err := srv.StartGRPC(); err != nil {
|
||||
logger.Error("grpc server error", "error", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
<-ctx.Done()
|
||||
logger.Info("shutting down")
|
||||
grpcSrv.Shutdown()
|
||||
srv.ShutdownGRPC()
|
||||
return srv.Shutdown(context.Background())
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -49,7 +50,7 @@ func runStatus(cmd *cobra.Command, args []string) error {
|
||||
Transport: &http.Transport{TLSClientConfig: tlsCfg},
|
||||
}
|
||||
|
||||
resp, err := client.Get(statusAddr + "/v1/status")
|
||||
resp, err := client.Get(strings.TrimRight(statusAddr, "/") + "/v1/status")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user