1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
10 "git.arvados.org/arvados.git/lib/service"
11 "git.arvados.org/arvados.git/sdk/go/arvados"
12 "git.arvados.org/arvados.git/sdk/go/arvadosclient"
13 "github.com/prometheus/client_golang/prometheus"
16 var Command = service.Command(arvados.ServiceNameGitHTTP, newHandler)
18 func newHandler(ctx context.Context, cluster *arvados.Cluster, token string, reg *prometheus.Registry) service.Handler {
19 client, err := arvados.NewClientFromConfig(cluster)
21 return service.ErrorHandler(ctx, cluster, err)
23 ac, err := arvadosclient.New(client)
25 return service.ErrorHandler(ctx, cluster, err)
28 clientPool: &arvadosclient.ClientPool{Prototype: ac},
30 handler: newGitHandler(ctx, cluster),