Documentation
¶
Index ¶
- type Aerospike
- type Backend
- type BackendType
- type Cassandra
- type Compression
- type CompressionType
- type Configuration
- type InfluxMetrics
- type Log
- type LogLevel
- type Memcache
- type Metrics
- type MetricsType
- type OWLog
- type PrometheusMetrics
- type RateLimiting
- type Redis
- type RedisTLS
- type RequestLimits
- type Routes
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aerospike ¶
type Aerospike struct { DefaultTTLSecs int `mapstructure:"default_ttl_seconds"` Host string `mapstructure:"host"` Hosts []string `mapstructure:"hosts"` Port int `mapstructure:"port"` Namespace string `mapstructure:"namespace"` User string `mapstructure:"user"` Password string `mapstructure:"password"` MaxReadRetries int `mapstructure:"max_read_retries"` MaxWriteRetries int `mapstructure:"max_write_retries"` // Please set this to a value lower than the `proto-fd-idle-ms` (converted // to seconds) value set in your Aerospike Server. This is to avoid having // race conditions where the server closes the connection but the client still // tries to use it. If set to a value less than or equal to 0, Aerospike // Client's default value will be used which is 55 seconds. ConnIdleTimeoutSecs int `mapstructure:"connection_idle_timeout_seconds"` // Specifies the size of the connection queue per node. ConnQueueSize int `mapstructure:"connection_queue_size"` }
type Backend ¶
type Backend struct { Type BackendType `mapstructure:"type"` Aerospike Aerospike `mapstructure:"aerospike"` Cassandra Cassandra `mapstructure:"cassandra"` Memcache Memcache `mapstructure:"memcache"` Redis Redis `mapstructure:"redis"` }
type BackendType ¶
type BackendType string
const ( BackendAerospike BackendType = "aerospike" BackendCassandra BackendType = "cassandra" BackendMemcache BackendType = "memcache" BackendMemory BackendType = "memory" BackendRedis BackendType = "redis" )
type Compression ¶
type Compression struct {
Type CompressionType `mapstructure:"type"`
}
type CompressionType ¶
type CompressionType string
const ( CompressionNone CompressionType = "none" CompressionSnappy CompressionType = "snappy" )
type Configuration ¶
type Configuration struct { Port int `mapstructure:"port"` AdminPort int `mapstructure:"admin_port"` IndexResponse string `mapstructure:"index_response"` Log Log `mapstructure:"log"` RateLimiting RateLimiting `mapstructure:"rate_limiter"` RequestLimits RequestLimits `mapstructure:"request_limits"` StatusResponse string `mapstructure:"status_response"` Backend Backend `mapstructure:"backend"` Compression Compression `mapstructure:"compression"` Metrics Metrics `mapstructure:"metrics"` Routes Routes `mapstructure:"routes"` Stats stats.StatsConfig `mapstructure:"stats"` Server Server `mapstructure:"server"` OWLog OWLog `mapstructure:"ow_log"` }
func NewConfig ¶
func NewConfig(filename string) Configuration
func (*Configuration) ValidateAndLog ¶
func (cfg *Configuration) ValidateAndLog()
ValidateAndLog validates the config, terminating the program on any errors. It also logs the config values that it used.
type InfluxMetrics ¶
type InfluxMetrics struct { Enabled bool `mapstructure:"enabled"` Host string `mapstructure:"host"` Database string `mapstructure:"database"` Measurement string `mapstructure:"measurement"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` AlignTimestamps bool `mapstructure:"align_timestamps"` }
type Metrics ¶
type Metrics struct { Type MetricsType `mapstructure:"type"` Influx InfluxMetrics `mapstructure:"influx"` Prometheus PrometheusMetrics `mapstructure:"prometheus"` }
type MetricsType ¶
type MetricsType string
const ( MetricsNone MetricsType = "none" MetricsInflux MetricsType = "influx" )
type PrometheusMetrics ¶
type PrometheusMetrics struct { Port int `mapstructure:"port"` Namespace string `mapstructure:"namespace"` Subsystem string `mapstructure:"subsystem"` TimeoutMillisRaw int `mapstructure:"timeout_ms"` Enabled bool `mapstructure:"enabled"` }
func (*PrometheusMetrics) Timeout ¶
func (promMetricsConfig *PrometheusMetrics) Timeout() time.Duration
type RateLimiting ¶
type RequestLimits ¶
Click to show internal directories.
Click to hide internal directories.