config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: Apache-2.0 Imports: 11 Imported by: 15

Documentation

Index

Constants

View Source
const (
	KeyCirconusAPIToken                   = "circonus.api.token"
	KeyCirconusAPIURL                     = "circonus.api.url"
	KeyCirconusBrokerID                   = "circonus.broker.id"
	KeyCirconusBrokerMaxResponseTime      = "circonus.broker.max_response_time"
	KeyCirconusBrokerSelectTag            = "circonus.broker.select_tag"
	KeyCirconusCheckDisplayName           = "circonus.check.display_name"
	KeyCirconusCheckForceMetricActivation = "circonus.check.force_metric_activation"
	KeyCirconusCheckID                    = "circonus.check.id"
	KeyCirconusCheckInstanceID            = "circonus.check.instance_id"
	KeyCirconusCheckMaxURLAge             = "circonus.check.max_url_age"
	KeyCirconusCheckSearchTag             = "circonus.check.search_tag"
	KeyCirconusCheckSecret                = "circonus.check.secret"
	KeyCirconusCheckSubmissionURL         = "circonus.check.submission_url"
	KeyCirconusCheckTags                  = "circonus.check.tags"
	KeyCirconusCheckTargetHost            = "circonus.check.target_host"
	KeyCirconusDebug                      = "circonus.debug"
	KeyCirconusEnabled                    = "circonus.enabled"
	KeyGoogleAgentEnable                  = "google.agent.enabled"

	KeyLogLevel = "log.level"

	KeyNumIOThreads = "run.num-io-threads"
	KeyRetryDBInit  = "run.retry-db-init"

	KeyPGData         = "postgresql.pgdata"
	KeyPGDatabase     = "postgresql.database"
	KeyPGHost         = "postgresql.host"
	KeyPGMode         = "postgresql.mode"
	KeyPGPassword     = "postgresql.password"
	KeyPGPollInterval = "postgresql.poll-interval"
	KeyPGPort         = "postgresql.port"
	KeyPGUser         = "postgresql.user"

	KeyWALReadAhead = "postgresql.wal.read-ahead"
	KeyWALThreads   = "postgresql.wal.threads"

	KeyXLogMode = "postgresql.xlog.mode"
	KeyXLogPath = "postgresql.xlog.pg_xlogdump-path"
)
View Source
const (
	MetricsSysPreadLatency = "ioc-sys-pread-ms"
	MetricsPrefaultCount   = "ioc-prefault-count"

	MetricsSysCloseCount      = "fh-sys-close-count"
	MetricsSysOpenCount       = "fh-sys-open-count"
	MetricsSysOpenLatency     = "fh-sys-open-us"
	MetricsSysPreadBytes      = "fh-sys-pread-bytes"
	MetricsXLogDumpErrorCount = "fh-xlogdump-error-count"

	MetricsWALFaultCount        = "wal-file-fault-count"
	MetricsWALFaultTime         = "wal-file-fault-time"
	MetricsXLogDumpLen          = "wal-xlogdump-out-len"
	MetricsXLogDumpLinesMatched = "wal-xlogdump-lines-matched"
	MetricsXLogDumpLinesScanned = "wal-xlogdump-lines-scanned"
	MetricsXLogPrefaulted       = "wal-xlog-prefaulted-count"
)

Variables

This section is empty.

Functions

func IsDebug

func IsDebug() bool

IsDebug returns true when the server is configured for debug level

func ValidStringArg

func ValidStringArg(argname string, validArgs []string) error

ValidStringArg takes a viper key and a list of valid args. If the key is not valid, return an error.

Types

type Agent added in v0.1.1

type Agent struct {
	RetryInit bool
}

type Config

func NewDefault

func NewDefault() (*Config, error)

type DBPool

type DBPool = pgx.ConnPoolConfig

type FHCacheConfig

type FHCacheConfig struct {
	MaxOpenFiles uint
	Size         uint
	TTL          time.Duration
	PGDataPath   string
}

type IOCacheConfig

type IOCacheConfig struct {
	MaxConcurrentIOs uint
	Size             uint
	TTL              time.Duration
}

type Metrics

type Metrics = cgm.Config

type WALCacheConfig

type WALCacheConfig struct {
	Mode         WALMode
	ReadAhead    uint32
	PGDataPath   string
	XLogDumpPath string
}

type WALMode

type WALMode int
const (
	WALModeDefault WALMode = iota
	WALModePG
	WALModeXLog
)

Jump to

Keyboard shortcuts

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