etc

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrConfigFileNotFound is exported
	ErrConfigFileNotFound = errors.New("config file not found")
	//ErrConfigGenerateFailure is exported
	ErrConfigGenerateFailure = errors.New("config file generated failure")
	//ErrConfigFormatInvalid is exported
	ErrConfigFormatInvalid = errors.New("config file format invalid")
	//ErrConfigServerDataInvalid is exported
	ErrConfigServerDataInvalid = errors.New("config server data invalid")
)

Functions

func CacheConfigs

func CacheConfigs() *cache.CacheConfigs

CacheConfigs is exported

func CenterHost

func CenterHost() string

CenterHost is exported

func ClusterConfigs

func ClusterConfigs() *gzkwrapper.WorkerArgs

ClusterConfigs is exported

func LoggerConfigs

func LoggerConfigs() *logger.Args

LoggerConfigs is exported

func New

func New(file string) error

New is exported

func PidFile

func PidFile() string

PidFile is exported

func RetryStartup

func RetryStartup() bool

RetryStartup is exported

func SaveServerConfig

func SaveServerConfig(data []byte) error

SaveServerConfig is exported

func UseServerConfig

func UseServerConfig() bool

UseServerConfig is exported

func WebSiteHost

func WebSiteHost() string

WebSiteHost is exported

Types

type Configuration

type Configuration struct {
	Version         string `yaml:"version" json:"version"`
	PidFile         string `yaml:"pidfile" json:"pidfile"`
	RetryStartup    bool   `yaml:"retrystartup" json:"retrystartup"`
	UseServerConfig bool   `yaml:"useserverconfig" json:"useserverconfig"`
	CenterHost      string `yaml:"centerhost" json:"centerhost"`
	WebsiteHost     string `yaml:"websitehost" json:"websitehost"`

	Cluster struct {
		Hosts     string `yaml:"hosts" json:"hosts"`
		Root      string `yaml:"root" json:"root"`
		Device    string `yaml:"device" json:"device"`
		Runtime   string `yaml:"runtime" json:"runtime"`
		OS        string `yaml:"os" json:"os"`
		Platform  string `yaml:"platform" json:"platform"`
		Pulse     string `yaml:"pulse" json:"pulse"`
		Threshold int    `yaml:"threshold" json:"threshold"`
	} `yaml:"cluster" json:"cluster"`

	API struct {
		Hosts      []string `yaml:"hosts" json:"hosts"`
		EnableCors bool     `yaml:"enablecors" json:"enablecors"`
	} `yaml:"api" json:"api"`

	Cache struct {
		MaxJobs       int    `yaml:"maxjobs" json:"maxjobs"`
		SaveDirectory string `yaml:"savedirectory" json:"savedirectory"`
		AutoClean     bool   `yaml:"autoclean" json:"autoclean"`
		CleanInterval string `yaml:"cleaninterval" json:"cleaninterval"`
		PullRecovery  string `yaml:"pullrecovery" json:"pullrecovery"`
	} `yaml:"cache" json:"cache"`

	Logger struct {
		LogFile  string `yaml:"logfile" json:"logfile"`
		LogLevel string `yaml:"loglevel" json:"loglevel"`
		LogSize  int64  `yaml:"logsize" json:"logsize"`
	} `yaml:"logger" json:"logger"`
}

Configuration is exported

var (
	//SystemConfig is exported, global config object.
	SystemConfig *Configuration
)

Jump to

Keyboard shortcuts

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