Merge branch '8784-dir-listings'
[arvados.git] / services / keepstore / usage.go
index c067ec090be73b6b9ac69a3ef282bc122f8e6884..5f6fd90a1cda96bd41f0039d9b5be491c39a050b 100644 (file)
@@ -1,22 +1,32 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
        "flag"
        "fmt"
        "os"
+       "sort"
+       "strings"
 
        "github.com/ghodss/yaml"
 )
 
 func usage() {
        c := DefaultConfig()
+       knownTypes := []string{}
        for _, vt := range VolumeTypes {
                c.Volumes = append(c.Volumes, vt().Examples()...)
+               knownTypes = append(knownTypes, vt().Type())
        }
        exampleConfigFile, err := yaml.Marshal(c)
        if err != nil {
                panic(err)
        }
+       sort.Strings(knownTypes)
+       knownTypeList := strings.Join(knownTypes, ", ")
        fmt.Fprintf(os.Stderr, `
 
 keepstore provides a content-addressed data store backed by a local filesystem or networked storage.
@@ -42,6 +52,10 @@ Listen:
     "address" is a host IP address or name and "port" is a port number
     or name.
 
+LogFormat:
+
+    Format of request/response and error logs: "json" or "text".
+
 PIDFile:
 
    Path to write PID file during startup. This file is kept open and
@@ -110,5 +124,9 @@ Volumes:
     use all directories named "keep" that exist in the top level
     directory of a mount point at startup time.
 
-`, exampleConfigFile)
+    Volume types: %s
+
+    (See volume configuration examples above.)
+
+`, exampleConfigFile, knownTypeList)
 }