npmconfig

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ConfigEnvPath is what's used by viper to load config path
	ConfigEnvPath = "NPM_CONFIG"
)

Variables

View Source
var DefaultConfig = Config{
	ResyncPeriodInMinutes: defaultResyncPeriod,
	ListeningPort:         defaultListeningPort,
	ListeningAddress:      "0.0.0.0",
	Toggles: Toggles{
		EnablePrometheusMetrics: true,
		EnablePprof:             true,
		EnableHTTPDebugAPI:      true,
	},
}

DefaultConfig is the guaranteed configuration NPM can run in out of the box

Functions

func GetConfigPath

func GetConfigPath() string

GetConfigPath TODO: solidify config paths

Types

type Config

type Config struct {
	ResyncPeriodInMinutes int     `json:"ResyncPeriodInMinutes"`
	ListeningPort         int     `json:"ListeningPort"`
	ListeningAddress      string  `json:"ListeningAddress"`
	Toggles               Toggles `json:"Toggles"`
}

type Toggles

type Toggles struct {
	EnablePrometheusMetrics bool
	EnablePprof             bool
	EnableHTTPDebugAPI      bool
}

Jump to

Keyboard shortcuts

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