config

package
v0.0.0-...-7161ace Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefault

func SetDefault(config *Config)

Types

type Config

type Config struct {
	Server Server

	// Mongo config
	Mongo mongodb.Config
}

Config config for server

func ReadConfig

func ReadConfig(path, name, configType string) *Config

ReadConfig config for server

func (*Config) AddFlags

func (s *Config) AddFlags(fs *pflag.FlagSet, c *Config)

AddFlags adds flags to the specified FlagSet

type Server

type Server struct {
	// api server bind address
	BindAddr string
	// monitor metric path
	MetricPath string
	// PprofAddr the address for pprof to use while exporting profiling results.
	PprofAddr string
}

Jump to

Keyboard shortcuts

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