github.com/uber/kraken@v0.1.4/origin/cmd/config.go (about) 1 // Copyright (c) 2016-2019 Uber Technologies, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 package cmd 15 16 import ( 17 "github.com/uber/kraken/core" 18 "github.com/uber/kraken/lib/backend" 19 "github.com/uber/kraken/lib/blobrefresh" 20 "github.com/uber/kraken/lib/hashring" 21 "github.com/uber/kraken/lib/healthcheck" 22 "github.com/uber/kraken/lib/hostlist" 23 "github.com/uber/kraken/lib/metainfogen" 24 "github.com/uber/kraken/lib/persistedretry" 25 "github.com/uber/kraken/lib/store" 26 "github.com/uber/kraken/lib/torrent/networkevent" 27 "github.com/uber/kraken/lib/torrent/scheduler" 28 "github.com/uber/kraken/localdb" 29 "github.com/uber/kraken/metrics" 30 "github.com/uber/kraken/nginx" 31 "github.com/uber/kraken/origin/blobserver" 32 "github.com/uber/kraken/utils/httputil" 33 34 "go.uber.org/zap" 35 ) 36 37 // Config defines origin server configuration. 38 // TODO(evelynl94): consolidate cluster and hashring. 39 type Config struct { 40 Verbose bool 41 ZapLogging zap.Config `yaml:"zap"` 42 Cluster hostlist.Config `yaml:"cluster"` 43 HashRing hashring.Config `yaml:"hashring"` 44 HealthCheck healthcheck.FilterConfig `yaml:"healthcheck"` 45 BlobServer blobserver.Config `yaml:"blobserver"` 46 CAStore store.CAStoreConfig `yaml:"castore"` 47 Scheduler scheduler.Config `yaml:"scheduler"` 48 NetworkEvent networkevent.Config `yaml:"network_event"` 49 PeerIDFactory core.PeerIDFactory `yaml:"peer_id_factory"` 50 Metrics metrics.Config `yaml:"metrics"` 51 MetaInfoGen metainfogen.Config `yaml:"metainfogen"` 52 Backends []backend.Config `yaml:"backends"` 53 Auth backend.AuthConfig `yaml:"auth"` 54 BlobRefresh blobrefresh.Config `yaml:"blobrefresh"` 55 LocalDB localdb.Config `yaml:"localdb"` 56 WriteBack persistedretry.Config `yaml:"writeback"` 57 Nginx nginx.Config `yaml:"nginx"` 58 TLS httputil.TLSConfig `yaml:"tls"` 59 }