Exemple #1
0
// Init initialize needed variables
func Init(u string) {

	var err error

	uuid = u

	str.Init(uuid)
	strategy, err = str.New() // Reads the strategy file
	if err != nil {
		log.Error(uuid, "fiddler.init", err, "Reading the streategy file.")
	}
}
Exemple #2
0
// Init initialization of logs and strategy
func Init(u string) {

	var err error
	uuid = u

	strategy.Init(uuid)
	str, err = strategy.New()
	if err != nil {
		log.Error(uuid, "coral.init", err, "Reading the streategy file.")
	}
	endpoints = str.GetPillarEndpoints()
}
Exemple #3
0
// Init initialize the needed variables
func Init(u string) (string, error) {

	var err error

	uuid = u
	str.Init(uuid)

	strategy, err = str.New()
	if err != nil {
		log.Error(uuid, "source.init", err, "Get Strategy Configuration")
		return "", err
	}

	credential, err = strategy.GetCredential(strategy.Map.Foreign, "foreign")
	if err != nil {
		log.Error(uuid, "source.init", err, "Get Credentials for external source")
		return "", err
	}

	return strategy.Map.Foreign, err
}