14946: Fixes Fixnum deprecation warning.
[arvados.git] / services / arv-git-httpd / server.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package main
6
7 import (
8         "net/http"
9
10         "git.curoverse.com/arvados.git/sdk/go/health"
11         "git.curoverse.com/arvados.git/sdk/go/httpserver"
12 )
13
14 type server struct {
15         httpserver.Server
16 }
17
18 func (srv *server) Start() error {
19         mux := http.NewServeMux()
20         mux.Handle("/", &authHandler{handler: newGitHandler()})
21         mux.Handle("/_health/", &health.Handler{
22                 Token:  theConfig.ManagementToken,
23                 Prefix: "/_health/",
24         })
25         srv.Handler = mux
26         srv.Addr = theConfig.Listen
27         return srv.Server.Start()
28 }