Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // CurrentVersion is the most recent Version that can be parsed. CurrentVersion = MajorMinorVersion(1, 0) ErrTypeVersionNotSpecified = "ErrConfigVersionNotSpecified" ErrTypeUnsupportedVersion = "ErrConfigUnsupportedVersion" ErrVersionNotSpecified = oerr.NewError(ErrTypeVersionNotSpecified, "Configuration version not specified") ErrUnsupportedVersion = oerr.NewError(ErrTypeUnsupportedVersion, "Unsupported configuration version") )
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Version *Version `yaml:"version"` Filename string `yaml:"-"` Log Log `yaml:"log"` HTTP HTTP `yaml:"http"` Tasks Tasks `yaml:"tasks"` Docker Docker `yaml:"docker"` Storage Storage `yaml:"storage"` }
func Parse ¶
func Parse(rd io.Reader) (*Configuration, error)
Parse parses an input configuration and returns docker configuration structure
func ParseFile ¶
func ParseFile(filename string) (*Configuration, error)
type HTTP ¶
type HTTP struct { // Addr specifies the bind address for the registry instance. Addr string `yaml:"addr,omitempty"` TLS HTTPTLS `yaml:"tls,omitempty"` }
HTTP contains configuration parameters for the registry's http interface.
type HTTPTLS ¶
type HTTPTLS struct { // Certificate specifies the path to an x509 certificate file to // be used for TLS. Certificate string `yaml:"certificate,omitempty"` // Key specifies the path to the x509 key file, which should // contain the private portion for the file specified in // Certificate. Key string `yaml:"key,omitempty"` // Specifies the CA certs for client authentication // A file may contain multiple CA certificates encoded as PEM ClientCAs []string `yaml:"clientcas,omitempty"` }
TLS instructs the http server to listen with a TLS configuration. This only support simple tls configuration with a cert and key. Mostly, this is useful for testing situations or simple deployments that require tls. If more complex configurations are required, use a proxy or make a proposal to add support here.
type Log ¶
type Log struct { // Level is the granularity at which registry operations are logged. Level Loglevel `yaml:"level"` // Formatter overrides the default formatter with another. Options // include "text" and "json". Formatter string `yaml:"formatter,omitempty"` }
Log supports setting various parameters related to the logging subsystem.
type Loglevel ¶
type Loglevel string
Loglevel is the level at which operations are logged This can be error, warn, info, or debug
func (*Loglevel) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Umarshaler interface Unmarshals a string into a Loglevel, lowercasing the string and validating that it represents a valid loglevel
type Version ¶
type Version string
Version is a major/minor version pair of the form Major.Minor Major version upgrades indicate structure or type changes Minor version upgrades should be strictly additive
func MajorMinorVersion ¶
MajorMinorVersion constructs a Version from its Major and Minor components