server

package
v0.0.0-...-20af522 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DevConfig = &Config{
	Address: "127.0.0.1:8385",
}

DevConfig provides a dev config.

Functions

func Logger

func Logger(lvl string, dev bool) *zap.Logger

Logger initializes a new logger. When dev is set to true, structured logging is disabled and all logs will be output to the console.

Types

type Backend

type Backend struct {
	// Name is the name of the backend. If stori does not support the defined
	// backend, it will look in its PATH for a binary plugin named
	// `stori-{name}-backend`.
	Name string `json:"name"`

	// Config contains the backend's config parameters. Since different backends
	// require different configuration parameters, we can't parse the object yet
	// since we don't know the schema.
	Config map[string]interface{} `json:"config"`
}

Backend defines parameters for stori's persistence layer.

type BlobStore

type BlobStore struct {
	// Name is the name of the backend. If stori does not support the defined
	// backend, it will look in its PATH for a binary plugin named
	// `stori-{name}-blobstore`.
	Name string `json:"name"`

	// Config contains the blobstore's config parameters. Since different
	// blobstores require different configuration parameters, we can't parse the
	// object yet since we don't know the schema.
	Config map[string]interface{} `json:"config"`
}

BlobStore defines parameters for stori's blob storage engine.

type Config

type Config struct {
	Address string `json:"address"`
	TLS     TLS    `json:"tls,omitempty"`
}

Config defines the parameters for the registry.

func LoadConfigFile

func LoadConfigFile(path string) (*Config, error)

LoadConfigFile loads the configuration from the given file.

type Registry

type Registry struct {
	Backend   `json:"backend"`
	BlobStore `json:"blobStore"`
}

Registry defines registry-specific parameters.

type TLS

type TLS struct {
	Enabled  bool   `json:"enabled"`
	CertFile string `json:"certFile"`
	KeyFile  string `json:"keyFile"`
}

TLS defines parameters for TLS connections to the registry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL