mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 17:52:14 +00:00
fix: add requests
This commit is contained in:
34
pkg/management/api/grpc/server.go
Normal file
34
pkg/management/api/grpc/server.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package grpc
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var _ ManagementServiceServer = (*Server)(nil)
|
||||
|
||||
type Config struct {
|
||||
Port string
|
||||
SearchLimit int
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
port string
|
||||
searchLimit int
|
||||
}
|
||||
|
||||
func StartServer(conf Config) *Server {
|
||||
return &Server{
|
||||
port: conf.Port,
|
||||
searchLimit: conf.SearchLimit,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Server) GRPCPort() string {
|
||||
return s.port
|
||||
}
|
||||
|
||||
func (s *Server) GRPCServer() (*grpc.Server, error) {
|
||||
gs := grpc.NewServer()
|
||||
RegisterManagementServiceServer(gs, s)
|
||||
return gs, nil
|
||||
}
|
||||
Reference in New Issue
Block a user