etc

package
v0.0.0-...-b392570 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERRConfigurationParseEnv = errors.New("configuration parseEnv error")
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {

	//base options
	Version      string `yaml:"version"  json:"version"`
	PIDFile      string `yaml:"pidfile" json:"pidfile"`
	RetryStartup bool   `yaml:"retrystartup" json:"retrystartup"`
	SiteAPI      string `yaml:"siteapi" json:"siteapi"`

	Cluster struct {
		//driver opts
		DriverOpts []string `yaml:"opts" json:"opts"`
		//service discovery opts
		Discovery struct {
			URIs      string `yaml:"uris" json:"uris"`
			Cluster   string `yaml:"cluster" json:"cluster"`
			Heartbeat string `yaml:"heartbeat" json:"heartbeat"`
		} `yaml:"discovery" json:"discovery"`
	} `yaml:"cluster" json:"cluster"`

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

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

	//log options
	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

func NewConfiguration

func NewConfiguration(file string) (*Configuration, error)

NewConfiguration is exported

func (*Configuration) GetLogger

func (conf *Configuration) GetLogger() *logger.Args

GetLogger is exported

func (*Configuration) GetNotificationsEndPoints

func (conf *Configuration) GetNotificationsEndPoints() []notify.EndPoint

GetNotificationsEndPoints is exported

func (*Configuration) ParseEnv

func (conf *Configuration) ParseEnv() error

ParseEnv is exported

Jump to

Keyboard shortcuts

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