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 17, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CacheConfigs

func CacheConfigs() *cache.CacheConfigs

CacheConfigs is exported

func ClusterConfigs

func ClusterConfigs() *gzkwrapper.ServerArgs

ClusterConfigs is exported

func LoggerConfigs

func LoggerConfigs() *logger.Args

LoggerConfigs is exported

func New

func New(file string) error

New is exported

func Notifications

func Notifications() []notify.EndPoint

Notifications 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 SchedulerConfigs

func SchedulerConfigs() *scheduler.SchedulerConfigs

SchedulerConfigs is exported

func UseServerConfig

func UseServerConfig() bool

UseServerConfig is exported

Types

type Configuration

type Configuration struct {
	sync.RWMutex
	Version         string `yaml:"version" json:"version"`
	PidFile         string `yaml:"pidfile" json:"pidfile"`
	RetryStartup    bool   `yaml:"retrystartup" json:"retrystartup"`
	UseServerConfig bool   `yaml:"useserverconfig" json:"useserverconfig"`

	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"`
		Timeout   string `yaml:"timeout" json:"timeout"`
		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"`

	Scheduler struct {
		AllocMode     string `yaml:"allocmode" json:"allocmode"`
		AllocRecovery string `yaml:"allocrecovery" json:"allocrecovery"`
	} `yaml:"scheduler" json:"scheduler"`

	Cache struct {
		LRUSize                    int `yaml:"lrusize" json:"lrusize"`
		types.StorageDriverConfigs `yaml:"storagedriver" json:"storagedriver"`
	} `yaml:"cache" json:"cache"`

	Notifications notify.Notifications `yaml:"notifications" json:"notifications"`

	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 *Configuration       = nil
	ServerConfig *models.ServerConfig = nil
)

Jump to

Keyboard shortcuts

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