config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version     = "dev"
	BuildCommit = ""
	BuildDate   = ""
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Port string `default:"8080"`
	// Timeout represents graceful shutdown period. Defaults to 60 seconds.
	Timeout       time.Duration `default:"60s"`
	CacheSizeInMB int64         `default:"100"`
	GRPC          GRPCConfig
	NewRelic      NewRelicConfig
	DB            DBConfig
}

Config Server config

func Load

func Load(configFile string) (Config, error)

type DBConfig

type DBConfig struct {
	ConnectionString string
}

DBConfig contains DB connection details

type GRPCConfig

type GRPCConfig struct {
	MaxRecvMsgSizeInMB int `default:"10"`
	MaxSendMsgSizeInMB int `default:"10"`
}

GRPCConfig grpc options

type NewRelicConfig

type NewRelicConfig struct {
	Enabled bool   `default:"false"`
	AppName string `default:"stencil"`
	License string
}

NewRelicConfig contains the New Relic go-agent configuration

Jump to

Keyboard shortcuts

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