config

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SectionKey = "application"

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(c *Config)

Types

type Config

type Config struct {
	GrpcPort                 int  `json:"grpcPort" pflag:",On which grpc port to serve Catalog"`
	GrpcServerReflection     bool `json:"grpcServerReflection" pflag:",Enable GRPC Server Reflection"`
	HTTPPort                 int  `json:"httpPort" pflag:",On which http port to serve Catalog"`
	Secure                   bool `json:"secure" pflag:",Whether to run Catalog in secure mode or not"`
	ReadHeaderTimeoutSeconds int  `json:"readHeaderTimeoutSeconds" pflag:",The amount of time allowed to read request headers."`
}

func GetConfig

func GetConfig() *Config

func (Config) GetGrpcHostAddress

func (c Config) GetGrpcHostAddress() string

func (Config) GetHTTPHostAddress

func (c Config) GetHTTPHostAddress() string

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

Jump to

Keyboard shortcuts

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