zitadel/pkg/auth/api/api.go

22 lines
485 B
Go
Raw Normal View History

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