config

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

README

config

-- import "."

Usage

func FetchData
func FetchData(apiNo int, yml *load.Config, samplesToMerge *load.SamplesToMerge) []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, apiNo int, samplesToMerge *load.SamplesToMerge) bool

FetchLookups x

func GitCheckout
func GitCheckout(w *git.Worktree) error

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, dirPath string) error

LoadFile loads a single Flex config file

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

LoadFiles Loads Flex config files

func LoadV4IntegrationConfig
func LoadV4IntegrationConfig(v4Str string, configs *[]load.Config, fileName string, filePath string) error

LoadV4IntegrationConfig Loads Agent/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 RunAsync
func RunAsync(yml load.Config, samplesToMerge *load.SamplesToMerge, originalAPINo int)

RunAsync API in Async mode after lookup

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

RunFiles Processes yml files

func RunSync
func RunSync(yml load.Config, samplesToMerge *load.SamplesToMerge, originalAPINo int)

RunSync API in Sync mode after lookup

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) error

SubLookupFileData substitutes data from lookup files into config

func SubTimestamps
func SubTimestamps(strConf *string, currentTime time.Time)

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

func SyncGitConfigs
func SyncGitConfigs(customDir string) (bool, error)

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, samplesToMerge *load.SamplesToMerge) []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, apiNo int, samplesToMerge *load.SamplesToMerge) bool

FetchLookups x

func GitCheckout

func GitCheckout(w *git.Worktree) error

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, dirPath string) error

LoadFile loads a single Flex config file

func LoadFiles

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

LoadFiles Loads Flex config files

func LoadV4IntegrationConfig added in v1.2.0

func LoadV4IntegrationConfig(v4Str string, configs *[]load.Config, fileName string, filePath string) error

LoadV4IntegrationConfig Loads Agent/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 RunAsync added in v0.9.7

func RunAsync(yml load.Config, samplesToMerge *load.SamplesToMerge, originalAPINo int)

RunAsync API in Async mode after lookup

func RunFiles

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

RunFiles Processes yml files

func RunSync added in v0.9.7

func RunSync(yml load.Config, samplesToMerge *load.SamplesToMerge, originalAPINo int)

RunSync API in Sync mode after lookup

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) error

SubLookupFileData substitutes data from lookup files into config

func SubTimestamps

func SubTimestamps(strConf *string, currentTime time.Time)

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

func SyncGitConfigs

func SyncGitConfigs(customDir string) (bool, error)

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