chore: register reflection grpc server
This commit is contained in:
parent
e65282dcc5
commit
e6a90a8be8
1 changed files with 2 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"github.com/usememos/memos/store"
|
"github.com/usememos/memos/store"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
"google.golang.org/grpc/reflection"
|
||||||
)
|
)
|
||||||
|
|
||||||
type APIV2Service struct {
|
type APIV2Service struct {
|
||||||
|
|
@ -33,6 +34,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
|
||||||
apiv2pb.RegisterUserServiceServer(grpcServer, NewUserService(store, secret))
|
apiv2pb.RegisterUserServiceServer(grpcServer, NewUserService(store, secret))
|
||||||
apiv2pb.RegisterMemoServiceServer(grpcServer, NewMemoService(store))
|
apiv2pb.RegisterMemoServiceServer(grpcServer, NewMemoService(store))
|
||||||
apiv2pb.RegisterTagServiceServer(grpcServer, NewTagService(store))
|
apiv2pb.RegisterTagServiceServer(grpcServer, NewTagService(store))
|
||||||
|
reflection.Register(grpcServer)
|
||||||
|
|
||||||
return &APIV2Service{
|
return &APIV2Service{
|
||||||
Secret: secret,
|
Secret: secret,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue