// InitApiKeys initialises the structure that manages rate limitted
// access to the steam web API keys
InitApiKeys initialises the structure that manages rate limitted
access to the steam web API keys
// InitApiKeys initialises the structure that manages rate limitted // access to the steam web API keys
func InitApiKeys(waitG *sync.WaitGroup) {
	defer waitG.Done()
	APIKeysFromEnv := strings.Split(os.Getenv("STEAM_API_KEYS"), ",")
	for _, APIKey := range APIKeysFromEnv {
		newAPIKey := datastructures.APIKey{
			Key:      APIKey,
			LastUsed: time.Now(),
		}
		configuration.UsableAPIKeys.APIKeys = append(configuration.UsableAPIKeys.APIKeys, newAPIKey)
	}
	keyTime, err := strconv.Atoi(os.Getenv("KEY_USAGE_TIMER"))
	if err != nil {
		panic(err)
	}
	keyUsageTime = time.Duration(keyTime * int(time.Millisecond))
	configuration.Logger.Sugar().Infof("%d API keys initialised", len(configuration.UsableAPIKeys.APIKeys))
}
func InitApiKeys ( waitG * sync . WaitGroup ) { defer waitG . Done ( ) APIKeysFromEnv := strings . Split ( os . Getenv ( " " ) , " " ) for _ , APIKey := range APIKeysFromEnv { newAPIKey := datastructures . APIKey { Key : APIKey , LastUsed : time . Now ( ) , } configuration . UsableAPIKeys . APIKeys = append ( configuration . UsableAPIKeys . APIKeys , newAPIKey ) } keyTime , err := strconv . Atoi ( os . Getenv ( " " ) ) if err != nil { panic ( err ) } keyUsageTime = time . Duration ( keyTime * int ( time . Millisecond ) ) configuration . Logger . Sugar ( ) . Infof ( " " , len ( configuration . UsableAPIKeys . APIKeys ) ) }
InitApiKeys initialises the structure that manages rate limitted
access to the steam web API keys
InitApiKeys initialises the structure that manages rate limitted access to the steam web API keys