blob: 7b4aed4b69e3b980a6b6c4ac54ab0211246f0eea [file] [log] [blame]
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()
}