clair: Index | Files

package config

import ""


Package Files



var ErrDatasourceNotLoaded = errors.New("could not load configuration: no database source specified")

ErrDatasourceNotLoaded is returned when the datasource variable in the configuration file is not loaded properly

type APIConfig Uses

type APIConfig struct {
    Port                      int
    HealthPort                int
    Timeout                   time.Duration
    PaginationKey             string
    CertFile, KeyFile, CAFile string

APIConfig is the configuration for the API service.

type Config Uses

type Config struct {
    Database RegistrableComponentConfig
    Updater  *UpdaterConfig
    Notifier *NotifierConfig
    API      *APIConfig

Config is the global configuration for an instance of Clair.

func DefaultConfig Uses

func DefaultConfig() Config

DefaultConfig is a configuration that can be used as a fallback value.

func Load Uses

func Load(path string) (config *Config, err error)

Load is a shortcut to open a file, read it, and generate a Config. It supports relative and absolute paths. Given "", it returns DefaultConfig.

type File Uses

type File struct {
    Clair Config `yaml:"clair"`

File represents a YAML configuration file that namespaces all Clair configuration under the top-level "clair" key.

type NotifierConfig Uses

type NotifierConfig struct {
    Attempts         int
    RenotifyInterval time.Duration
    Params           map[string]interface{} `yaml:",inline"`

NotifierConfig is the configuration for the Notifier service and its registered notifiers.

type RegistrableComponentConfig Uses

type RegistrableComponentConfig struct {
    Type    string
    Options map[string]interface{}

RegistrableComponentConfig is a configuration block that can be used to determine which registrable component should be initialized and pass custom configuration to it.

type UpdaterConfig Uses

type UpdaterConfig struct {
    Interval time.Duration

UpdaterConfig is the configuration for the Updater service.

Package config imports 6 packages (graph). Updated 2017-05-12. Refresh now. Tools for package owners.