zitadel/pkg/admin/api/api.go

21 lines
485 B
Go
Raw Normal View History

2020-03-25 10:54:45 +01:00
package api
import (
"context"
2020-03-25 11:17:38 +01:00
grpc_util "github.com/caos/zitadel/internal/api/grpc"
2020-03-25 10:54:45 +01:00
"github.com/caos/zitadel/internal/api/grpc/server"
"github.com/caos/zitadel/pkg/admin/api/grpc"
)
type Config struct {
2020-03-25 11:17:38 +01:00
GRPC grpc_util.Config
2020-03-25 10:54:45 +01:00
}
func Start(ctx context.Context, conf Config) {
grpcServer := grpc.StartServer(conf.GRPC.ToServerConfig())
grpcGateway := grpc.StartGateway(conf.GRPC.ToGatewayConfig())
2020-03-25 10:54:45 +01:00
server.StartServer(ctx, grpcServer)
server.StartGateway(ctx, grpcGateway)
2020-03-25 10:54:45 +01:00
}