setting

package
v0.0.0-...-0bdedc6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEV  string = "development"
	PROD string = "production"
	TEST string = "test"
)

Variables

View Source
var (
	// App settings.
	Env        string = DEV
	InstanceId string
	AppUrl     string
	AppSubUrl  string

	// build
	BuildVersion string
	BuildCommit  string
	BuildStamp   int64

	// Paths
	LogsPath string
	HomePath string
	DataPath string

	// Log settings.
	LogModes   []string
	LogConfigs []util.DynMap

	// Http server options
	Protocol           Scheme
	HttpAddr, HttpPort string
	SshPort            int
	CertFile, KeyFile  string
	RouterLogging      bool
	StaticRootPath     string
	EnableGzip         bool

	// Http auth
	AdminKey string

	// Global setting objects.
	Cfg          *ini.File
	ConfRootPath string

	//Raintank Graphite Backend
	ElasticsearchUrl string
	TsdbUrl          string

	StatsEnabled    bool
	StatsAddr       string
	StatsPrefix     string
	StatsInterval   int
	StatsTimeout    time.Duration
	StatsBufferSize int

	Kafka KafkaSettings

	Alerting AlertingSettings

	// SMTP email settings
	Smtp SmtpSettings

	// QUOTA
	Quota QuotaSettings
)

Functions

func LogConfigurationInfo

func LogConfigurationInfo()

func NewConfigContext

func NewConfigContext(args *CommandLineArgs) error

func ToAbsUrl

func ToAbsUrl(relativeUrl string) string

Types

type AlertingSettings

type AlertingSettings struct {
	Enabled              bool
	Topic                string
	Distributed          bool
	TickQueueSize        int
	InternalJobQueueSize int
	ExecutorLRUSize      int
	EnableScheduler      bool
	EnableWorker         bool
	Executors            int
	GraphiteUrl          string
}

type CommandLineArgs

type CommandLineArgs struct {
	Config   string
	HomePath string
	Args     []string
}

type GlobalQuota

type GlobalQuota struct {
	Endpoint int64 `target:"endpoint"`
	Probe    int64 `target:"probe"`
}

func (*GlobalQuota) ToMap

func (q *GlobalQuota) ToMap() map[string]int64

type KafkaSettings

type KafkaSettings struct {
	Enabled bool
	Brokers string
	Topic   string
}

type OrgQuota

type OrgQuota struct {
	Endpoint      int64 `target:"endpoint"`
	Probe         int64 `target:"probe"`
	DownloadLimit int64 `target:"downloadLimit"`
}

func (*OrgQuota) ToMap

func (q *OrgQuota) ToMap() map[string]int64

type QuotaSettings

type QuotaSettings struct {
	Enabled bool
	Org     *OrgQuota
	Global  *GlobalQuota
}

type Scheme

type Scheme string
const (
	HTTP  Scheme = "http"
	HTTPS Scheme = "https"
)

type SmtpSettings

type SmtpSettings struct {
	Enabled     bool
	Host        string
	User        string
	Password    string
	CertFile    string
	KeyFile     string
	FromAddress string
	SkipVerify  bool

	SendWelcomeEmailOnSignUp bool
	TemplatesPattern         string
}

Jump to

Keyboard shortcuts

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