+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
import (
"flag"
"log"
"os"
+ "time"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/config"
"github.com/coreos/go-systemd/daemon"
- "github.com/ghodss/yaml"
)
var (
AttachmentOnlyHost string
TrustAllContent bool
+ Cache cache
+
// Hack to support old command line flag, which is a bool
// meaning "get actual token from environment".
deprecatedAllowAnonymous bool
func DefaultConfig() *Config {
return &Config{
Listen: ":80",
+ Cache: cache{
+ TTL: arvados.Duration(5 * time.Minute),
+ MaxCollectionEntries: 1000,
+ MaxCollectionBytes: 100000000,
+ MaxPermissionEntries: 1000,
+ MaxUUIDEntries: 1000,
+ },
}
}
}
if *dumpConfig {
- y, err := yaml.Marshal(cfg)
- if err != nil {
- log.Fatal(err)
- }
- os.Stdout.Write(y)
- os.Exit(0)
+ log.Fatal(config.DumpAndExit(cfg))
}
os.Setenv("ARVADOS_API_HOST", cfg.Client.APIHost)