npmconfig

package
v1.4.16 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 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,
		EnableV2NPM:             false,
		PlaceAzureChainFirst:    false,
	},
}

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
	EnableV2NPM             bool
	PlaceAzureChainFirst    bool
}

Jump to

Keyboard shortcuts

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