config

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2018 License: BSD-3-Clause Imports: 10 Imported by: 34

Documentation

Overview

Package config exposes static configuration data, and loaded user preferences.

Index

Constants

This section is empty.

Variables

View Source
var Version = "alpha"

Version is the compiled version of our binary. It is set via the Makefile.

Functions

func CreateTorusRoot added in v0.10.0

func CreateTorusRoot(checkPermissions bool) (string, error)

CreateTorusRoot creates the root directory for the Torus daemon.

Types

type Config

type Config struct {
	APIVersion string
	Version    string

	TorusRoot         string
	TransportAddress  string
	GatekeeperAddress string
	PidPath           string
	GatekeeperPidPath string
	DBPath            string
	LastUpdatePath    string

	RegistryURI *url.URL
	ManifestURI *url.URL
	CABundle    *x509.CertPool
	PublicKey   *prefs.PublicKey
}

Config represents the static and user defined configuration data for Torus.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the config, standardizing cli errors on failure.

func NewConfig

func NewConfig(torusRoot string) (*Config, error)

NewConfig returns a new Config, with loaded user preferences.

Jump to

Keyboard shortcuts

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