config

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

README

config

-- import "github.com/newrelic/nri-flex/internal/config"

Usage

func FetchData
func FetchData(apiNo int, yml *load.Config) []interface{}

FetchData fetches data from various inputs Also handles paginated responses for HTTP requests (tested against NR APIs)

func FetchLookups
func FetchLookups(cfg *load.Config, i int) bool

FetchLookups x

func GitCheckout
func GitCheckout(w *git.Worktree)

GitCheckout git checkout

func GitClone
func GitClone(dir string, u *url.URL) error

GitClone git clone

func GitPull
func GitPull(dir string) error

GitPull git pull

func LoadFile
func LoadFile(configs *[]load.Config, f os.FileInfo, path string) error

LoadFile loads a single Flex config file

func LoadFiles
func LoadFiles(configs *[]load.Config, files []os.FileInfo, path string)

LoadFiles Loads Flex config files

func ReadYML
func ReadYML(yml string) (load.Config, error)

ReadYML Unmarshals yml files

func Run
func Run(yml load.Config)

Run Action each config file

func RunFiles
func RunFiles(configs *[]load.Config)

RunFiles Processes yml files

func RunVariableProcessor
func RunVariableProcessor(i int, cfg *load.Config)

RunVariableProcessor substitute store variables into specific parts of config files

func SubEnvVariables
func SubEnvVariables(strConf *string)

SubEnvVariables substitutes environment variables into config Use a double dollar sign eg. $$MY_ENV_VAR to subsitute that environment variable into the config file Can be useful with kubernetes service environment variables

func SubLookupFileData
func SubLookupFileData(configs *[]load.Config, config load.Config)

SubLookupFileData substitutes data from lookup files into config

func SubTimestamps
func SubTimestamps(strConf *string)

SubTimestamps - return timestamp/date/datetime of current date/time with optional adjustment in various format

func SyncGitConfigs
func SyncGitConfigs(customDir string) bool

SyncGitConfigs Clone git repo if already exists, else pull latest version

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchData

func FetchData(apiNo int, yml *load.Config) []interface{}

FetchData fetches data from various inputs Also handles paginated responses for HTTP requests (tested against NR APIs)

func FetchLookups

func FetchLookups(cfg *load.Config, i int) bool

FetchLookups x

func GitCheckout

func GitCheckout(w *git.Worktree)

GitCheckout git checkout

func GitClone

func GitClone(dir string, u *url.URL) error

GitClone git clone

func GitPull

func GitPull(dir string) error

GitPull git pull

func LoadFile

func LoadFile(configs *[]load.Config, f os.FileInfo, path string) error

LoadFile loads a single Flex config file

func LoadFiles

func LoadFiles(configs *[]load.Config, files []os.FileInfo, path string)

LoadFiles Loads Flex config files

func ReadYML

func ReadYML(yml string) (load.Config, error)

ReadYML Unmarshals yml files

func Run

func Run(yml load.Config)

Run Action each config file

func RunFiles

func RunFiles(configs *[]load.Config)

RunFiles Processes yml files

func RunVariableProcessor

func RunVariableProcessor(i int, cfg *load.Config)

RunVariableProcessor substitute store variables into specific parts of config files

func SubEnvVariables

func SubEnvVariables(strConf *string)

SubEnvVariables substitutes environment variables into config Use a double dollar sign eg. $$MY_ENV_VAR to subsitute that environment variable into the config file Can be useful with kubernetes service environment variables

func SubLookupFileData

func SubLookupFileData(configs *[]load.Config, config load.Config)

SubLookupFileData substitutes data from lookup files into config

func SubTimestamps

func SubTimestamps(strConf *string)

SubTimestamps - return timestamp/date/datetime of current date/time with optional adjustment in various format

func SyncGitConfigs

func SyncGitConfigs(customDir string) bool

SyncGitConfigs Clone git repo if already exists, else pull latest version

Types

This section is empty.

Jump to

Keyboard shortcuts

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