config

package
v0.0.0-...-f3d1372 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                            int
	Consul                          ConsulConfig
	LogLevel                        string
	EnableHealthCheckCatalogService bool
	WatchedServices                 []WatchedServiceConfig
	HTTPHeaderRateLimit             HTTPHeaderRateLimitConfig
}

func Load

func Load() (*Config, error)

type ConsulConfig

type ConsulConfig struct {
	Host       string
	Port       int
	Token      string
	DataCenter string
}

type HTTPHeaderRateLimitConfig

type HTTPHeaderRateLimitConfig struct {
	IsEnabled     bool
	HeaderName    string
	DescriptorKey string
}

type StatsDConfig

type StatsDConfig struct {
	// contains filtered or unexported fields
}

func NewStatsDConfig

func NewStatsDConfig(appName string, flushPeriodInSeconds, port int, enabled bool) *StatsDConfig

func (*StatsDConfig) AppName

func (sdc *StatsDConfig) AppName() string

func (*StatsDConfig) Enabled

func (sdc *StatsDConfig) Enabled() bool

func (*StatsDConfig) FlushPeriodInSeconds

func (sdc *StatsDConfig) FlushPeriodInSeconds() int

func (*StatsDConfig) Port

func (sdc *StatsDConfig) Port() int

type WatchedServiceConfig

type WatchedServiceConfig struct {
	Name              string
	WhitelistedRoutes []string
}

Jump to

Keyboard shortcuts

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