mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 10:42:16 +00:00
fix: start server and gateway
This commit is contained in:
28
pkg/management/api/api.go
Normal file
28
pkg/management/api/api.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/caos/zitadel/internal/api/grpc/server"
|
||||
"github.com/caos/zitadel/pkg/management/api/grpc"
|
||||
)
|
||||
|
||||
type API struct {
|
||||
grpcServer grpc.Server
|
||||
gateway grpc.Gateway
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
GRPCServer grpc.Config
|
||||
Gateway grpc.GatewayConfig
|
||||
}
|
||||
|
||||
func Start(ctx context.Context, conf *Config) error {
|
||||
api := &API{
|
||||
grpcServer: *grpc.StartServer(conf.GRPCServer),
|
||||
gateway: *grpc.StartGateway(conf.Gateway),
|
||||
}
|
||||
server.StartServer(ctx, &api.grpcServer)
|
||||
server.StartGateway(ctx, &api.gateway)
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user