Skip to content

Commit

Permalink
fix: grpchealth and grpcreflect take multiple name arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Sep 5, 2024
1 parent 013556a commit a1ed84d
Showing 1 changed file with 18 additions and 57 deletions.
75 changes: 18 additions & 57 deletions internal/utxorpc/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,73 +56,34 @@ func Start(cfg *config.Config) error {
mux.Handle(watchPath, watchHandler)
mux.Handle(
grpchealth.NewHandler(
grpchealth.NewStaticChecker(queryconnect.QueryServiceName),
compress1KB,
),
)
mux.Handle(
grpchealth.NewHandler(
grpchealth.NewStaticChecker(submitconnect.SubmitServiceName),
compress1KB,
),
)
mux.Handle(
grpchealth.NewHandler(
grpchealth.NewStaticChecker(syncconnect.SyncServiceName),
compress1KB,
),
)
mux.Handle(
grpchealth.NewHandler(
grpchealth.NewStaticChecker(watchconnect.WatchServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1(
grpcreflect.NewStaticReflector(queryconnect.QueryServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1(
grpcreflect.NewStaticReflector(submitconnect.SubmitServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1(
grpcreflect.NewStaticReflector(syncconnect.SyncServiceName),
grpchealth.NewStaticChecker(
queryconnect.QueryServiceName,
submitconnect.SubmitServiceName,
syncconnect.SyncServiceName,
watchconnect.WatchServiceName,
),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1(
grpcreflect.NewStaticReflector(watchconnect.WatchServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1Alpha(
grpcreflect.NewStaticReflector(queryconnect.QueryServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1Alpha(
grpcreflect.NewStaticReflector(submitconnect.SubmitServiceName),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1Alpha(
grpcreflect.NewStaticReflector(syncconnect.SyncServiceName),
grpcreflect.NewStaticReflector(
queryconnect.QueryServiceName,
submitconnect.SubmitServiceName,
syncconnect.SyncServiceName,
watchconnect.WatchServiceName,
),
compress1KB,
),
)
mux.Handle(
grpcreflect.NewHandlerV1Alpha(
grpcreflect.NewStaticReflector(watchconnect.WatchServiceName),
grpcreflect.NewStaticReflector(
queryconnect.QueryServiceName,
submitconnect.SubmitServiceName,
syncconnect.SyncServiceName,
watchconnect.WatchServiceName,
),
compress1KB,
),
)
Expand Down

0 comments on commit a1ed84d

Please sign in to comment.