Checkpoint: grpc auth fix, issuer list/detail, v2 protos, architecture docs

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-03-15 11:39:13 -07:00
parent d0b1875dbb
commit ad167aed9b
41 changed files with 1080 additions and 219 deletions

View File

@@ -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 == "" {

View File

@@ -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())
}

View File

@@ -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
}