config

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config implements a the common configuration and defaults for all replicant configuration

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	LogLevel:  "INFO",
	APIPrefix: "/api",
	StoreURI:  "memory:-",
	Server: server.Config{
		ListenAddress:     "0.0.0.0:8080",
		WriteTimeout:      5 * time.Minute,
		ReadTimeout:       5 * time.Minute,
		ReadHeaderTimeout: 5 * time.Minute,
	},

	Drivers: DriverConfig{
		Web: web.Config{
			ServerURL:    "http://127.0.0.1:9222",
			DNSDiscovery: true,
			Proxied:      false,
		},
	},

	Callbacks: CallbackConfig{
		Webhook: webhook.Config{
			AdvertiseURL: "http://0.0.0.0:8080",
			PathPrefix:   "/api/callback",
		},
	},

	Emitters: EmitterConfig{
		Stdout: stdout.Config{Pretty: false},
		Prometheus: prometheus.Config{
			Path:              "/metrics",
			Gauges:            true,
			Summaries:         true,
			Labels:            []string{"transaction", "application", "environment", "component"},
			SummaryObjectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
		},

		Elasticsearch: elasticsearch.Config{},
	},
}

DefaultConfig for replicant

Functions

This section is empty.

Types

type CallbackConfig

type CallbackConfig struct {
	Webhook webhook.Config
}

CallbackConfig options

type Config

type Config struct {
	Debug     bool           `json:"debug" yaml:"debug"`
	LogLevel  string         `json:"log_level" yaml:"log_level"`
	APIPrefix string         `json:"api_prefix" yaml:"api_prefix"`
	StoreURI  string         `json:"store_path" yaml:"store_uri"`
	Server    server.Config  `json:"server" yaml:"server"`
	Drivers   DriverConfig   `json:"drivers" yaml:"drivers"`
	Emitters  EmitterConfig  `json:"emitters" yaml:"emitters"`
	Callbacks CallbackConfig `json:"callbacks" yaml:"callbacks"`
}

Config for replicant

type DriverConfig

type DriverConfig struct {
	Web web.Config `json:"web" yaml:"web"`
}

DriverConfig optins

type EmitterConfig

type EmitterConfig struct {
	Stdout        stdout.Config        `json:"stdout" yaml:"stdout"`
	Prometheus    prometheus.Config    `json:"prometheus" yaml:"prometheus"`
	Elasticsearch elasticsearch.Config `json:"elasticsearch" yaml:"elasticsearch"`
}

EmitterConfig options

Jump to

Keyboard shortcuts

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