Skip to content

Commit

Permalink
report store dir at startup (#89)
Browse files Browse the repository at this point in the history
* report store dir at startup

Signed-off-by: Pablo Chacin <[email protected]>

---------

Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin authored Jan 10, 2025
1 parent f53b4e7 commit 89ef600
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ curl http://external.url:9000/store/objectID/download
-h, --help help for store
-l, --log-level string log level (default "INFO")
-p, --port int port server will listen (default 9000)
-c, --store-dir string object store directory (default "/tmp/store/objectstore")
-c, --store-dir string object store directory (default "/tmp/k6build/store")
```

## SEE ALSO
Expand Down
4 changes: 2 additions & 2 deletions cmd/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func New() *cobra.Command {
srv.Handle("/store/", http.StripPrefix("/store", storeSrv))

listerAddr := fmt.Sprintf("0.0.0.0:%d", port)
log.Info("starting server", "address", listerAddr)
log.Info("starting server", "address", listerAddr, "object store", storeDir)
err = http.ListenAndServe(listerAddr, srv) //nolint:gosec
if err != nil {
log.Info("server ended", "error", err.Error())
Expand All @@ -111,7 +111,7 @@ func New() *cobra.Command {
},
}

cmd.Flags().StringVarP(&storeDir, "store-dir", "c", "/tmp/store/objectstore", "object store directory")
cmd.Flags().StringVarP(&storeDir, "store-dir", "c", "/tmp/k6build/store", "object store directory")
cmd.Flags().IntVarP(&port, "port", "p", 9000, "port server will listen")
cmd.Flags().StringVarP(&storeSrvURL,
"download-url", "d", "", "base url used for downloading objects."+
Expand Down

0 comments on commit 89ef600

Please sign in to comment.