Merge pull request #10 from sjpotter/master

make socket location configurable on cmd line
This commit is contained in:
Mrunal Patel 2016-09-15 16:04:40 -07:00 committed by GitHub
commit e48b274c35

View file

@ -14,8 +14,11 @@ import (
"google.golang.org/grpc"
)
var (
unixDomainSocket string
)
const (
unixDomainSocket = "/var/run/ocid.sock"
// TODO: Make configurable
timeout = 10 * time.Second
)
@ -233,6 +236,15 @@ func main() {
pullImageCommand,
}
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "sock",
Value: "/var/run/ocid.sock",
Usage: "Socket to connect to",
Destination: &unixDomainSocket,
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}