blob: 7b4aed4b69e3b980a6b6c4ac54ab0211246f0eea [file] [log] [blame]
Sergiusz Bazanski4c0e9b52020-04-08 22:42:33 +02001package main
2
3import (
4 "flag"
5
6 "code.hackerspace.pl/hscloud/go/mirko"
7 "github.com/golang/glog"
8
9 pb "code.hackerspace.pl/hscloud/devtools/depotview/proto"
10 "code.hackerspace.pl/hscloud/devtools/depotview/service"
11)
12
13var (
14 flagRemote = "https://gerrit.hackerspace.pl/hscloud"
15)
16
17func main() {
18 flag.StringVar(&flagRemote, "git_remote", flagRemote, "Address of Git repository to serve")
19 flag.Parse()
20
21 m := mirko.New()
22 if err := m.Listen(); err != nil {
23 glog.Exitf("Listen(): %v", err)
24 }
25
26 s := service.New(flagRemote)
27 pb.RegisterDepotViewServer(m.GRPC(), s)
28
29 if err := m.Serve(); err != nil {
30 glog.Exitf("Serve(): %v", err)
31 }
32
33 <-m.Done()
34}