config

package
v0.0.0-...-f67e159 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 3 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 {
	NewRelic NewRelic `mapstructure:"new_relic"`
	HTTP     HTTP     `mapstructure:"http"`
}

func Apply

func Apply(cfg *Config, opts ...Option) *Config

func Build

func Build(opts ...Option) *Config

func Default

func Default() *Config

type HTTP

type HTTP struct {
	Address             string `mapstructure:"address"`
	Port                string `mapstructure:"port"`
	DebugEnabled        bool   `mapstructure:"debug_enabled"`
	ProxyClientIPHeader string `mapstructure:"proxy_client_ip_header"`
}

type NewRelic

type NewRelic struct {
	Licence              string `mapstructure:"licence"`
	AppName              string `mapstructure:"app_name"`
	LogForwardingEnabled bool   `mapstructure:"log_forwarding_enabled"`
}

type Option

type Option func(cfg *Config) *Config

func FromViper

func FromViper() Option

func FromViperInstance

func FromViperInstance(v *viper.Viper) Option

func SetNewRelicLicence

func SetNewRelicLicence(licence string) Option

func SetPort

func SetPort(port int) Option

Jump to

Keyboard shortcuts

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