make socket location configurable on cmd line
This commit is contained in:
parent
0681d5d94b
commit
3c0485dd71
1 changed files with 13 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue