github.com/uber/kraken@v0.1.4/agent/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/agent/agentserver"
    18  	"github.com/uber/kraken/core"
    19  	"github.com/uber/kraken/lib/dockerdaemon"
    20  	"github.com/uber/kraken/lib/dockerregistry"
    21  	"github.com/uber/kraken/lib/store"
    22  	"github.com/uber/kraken/lib/torrent/networkevent"
    23  	"github.com/uber/kraken/lib/torrent/scheduler"
    24  	"github.com/uber/kraken/lib/upstream"
    25  	"github.com/uber/kraken/metrics"
    26  	"github.com/uber/kraken/nginx"
    27  	"github.com/uber/kraken/utils/httputil"
    28  
    29  	"go.uber.org/zap"
    30  )
    31  
    32  // Config defines agent configuration.
    33  type Config struct {
    34  	ZapLogging      zap.Config                     `yaml:"zap"`
    35  	Metrics         metrics.Config                 `yaml:"metrics"`
    36  	CADownloadStore store.CADownloadStoreConfig    `yaml:"store"`
    37  	Registry        dockerregistry.Config          `yaml:"registry"`
    38  	Scheduler       scheduler.Config               `yaml:"scheduler"`
    39  	PeerIDFactory   core.PeerIDFactory             `yaml:"peer_id_factory"`
    40  	NetworkEvent    networkevent.Config            `yaml:"network_event"`
    41  	Tracker         upstream.PassiveHashRingConfig `yaml:"tracker"`
    42  	BuildIndex      upstream.PassiveConfig         `yaml:"build_index"`
    43  	AgentServer     agentserver.Config             `yaml:"agentserver"`
    44  	RegistryBackup  string                         `yaml:"registry_backup"`
    45  	Nginx           nginx.Config                   `yaml:"nginx"`
    46  	TLS             httputil.TLSConfig             `yaml:"tls"`
    47  	AllowedCidrs    []string                       `yaml:"allowed_cidrs"`
    48  	DockerDaemon    dockerdaemon.Config            `yaml:docker_daemon`
    49  }