fix configs

This commit is contained in:
Livio Amstutz
2020-03-25 11:17:38 +01:00
parent 8b23c491f9
commit 40734f27c7
9 changed files with 38 additions and 58 deletions

View File

@@ -2,6 +2,8 @@ package api
import (
"context"
grpc_util "github.com/caos/zitadel/internal/api/grpc"
"github.com/caos/zitadel/internal/api/grpc/server"
"github.com/caos/zitadel/pkg/auth/api/grpc"
)
@@ -12,14 +14,13 @@ type API struct {
}
type Config struct {
GRPCServer grpc.Config
Gateway grpc.GatewayConfig
GRPC grpc_util.Config
}
func Start(ctx context.Context, conf *Config) error {
api := &API{
grpcServer: *grpc.StartServer(conf.GRPCServer),
gateway: *grpc.StartGateway(conf.Gateway),
grpcServer: *grpc.StartServer(conf.GRPC.ToServerConfig()),
gateway: *grpc.StartGateway(conf.GRPC.ToGatewayConfig()),
}
server.StartServer(ctx, &api.grpcServer)
server.StartGateway(ctx, &api.gateway)