| package main |
| |
| import ( |
| "flag" |
| |
| "code.hackerspace.pl/hscloud/go/mirko" |
| "github.com/golang/glog" |
| |
| pb "code.hackerspace.pl/hscloud/devtools/depotview/proto" |
| "code.hackerspace.pl/hscloud/devtools/depotview/service" |
| ) |
| |
| var ( |
| flagRemote = "https://gerrit.hackerspace.pl/hscloud" |
| ) |
| |
| func main() { |
| flag.StringVar(&flagRemote, "git_remote", flagRemote, "Address of Git repository to serve") |
| flag.Parse() |
| |
| m := mirko.New() |
| if err := m.Listen(); err != nil { |
| glog.Exitf("Listen(): %v", err) |
| } |
| |
| s := service.New(flagRemote) |
| pb.RegisterDepotViewServer(m.GRPC(), s) |
| |
| if err := m.Serve(); err != nil { |
| glog.Exitf("Serve(): %v", err) |
| } |
| |
| <-m.Done() |
| } |