config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	BindAddress  string `config:"api.bindaddress,required" json:"bindaddress" yaml:"api"`
	MaxOutputLen string `config:"api.maxoutputlen" json:"maxoutputlen" yaml:"maxoutputlen"`
}

type Config

type Config struct {
	Debug           bool   `config:"debug" json:"debug" yaml:"debug"`
	SpecFile        string `config:"specfile" json:"specfile" yaml:"specfile"`
	HostRootDir     string `config:"hostrootdir" json:"hostrootdir" yaml:"hostrootdir"`
	SkipStartupPrep bool   `config:"skipstartupprep" json:"skipstartupprep" yaml:"skipstartupprep"`

	Log       Log       `json:"log" yaml:"log"`
	API       API       `json:"api" yaml:"api"`
	Sandbox   Sandbox   `json:"sandbox" yaml:"sandbox"`
	Scheduler Scheduler `json:"scheduler" yaml:"scheduler"`
}

type ConfitaProvider

type ConfitaProvider struct {
	// contains filtered or unexported fields
}

func NewConfitaProvider

func NewConfitaProvider() *ConfitaProvider

func (*ConfitaProvider) Config

func (p *ConfitaProvider) Config() *Config

func (*ConfitaProvider) Load

func (p *ConfitaProvider) Load() error

type EnvProvider

type EnvProvider struct {
	// contains filtered or unexported fields
}

func NewEnvProvider

func NewEnvProvider(prefix string) *EnvProvider

func (*EnvProvider) Config

func (ep *EnvProvider) Config() *Config

func (*EnvProvider) Load

func (ep *EnvProvider) Load() (err error)

type Log

type Log struct {
	Level int `config:"log.level" json:"level" yaml:"level"`
}

type Provider

type Provider interface {
	Load() error
	Config() *Config
}

type Sandbox

type Sandbox struct {
	Runtime          string `config:"sandbox.runtime" json:"runtime" yaml:"runtime"`
	EnableNetworking bool   `config:"sandbox.enablenetworking" json:"enablenetworking" yaml:"enablenetworking"`
	Memory           string `config:"sandbox.memory" json:"memory" yaml:"memory"`
	TimeoutSeconds   int    `config:"sandbox.timeoutseconds" json:"executiontimeoutseconds" yaml:"executiontimeoutseconds"`
	StreamBufferCap  string `config:"sandbox.streambuffercap" json:"streambuffercap" yaml:"streambuffercap"`
}

type Scheduler added in v0.2.0

type Scheduler struct {
	UpdateImages string `config:"scheduler.updateimages" json:"updateimages" yaml:"updateimages"`
	UpdateSpecs  string `config:"scheduler.updatespecs" json:"updatespecs" yaml:"updatespecs"`
}

Jump to

Keyboard shortcuts

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