in provider/parameter_store_provider.go [48:68]
func (p *ParameterStoreProvider) GetSecretValues(
ctx context.Context,
descriptors []*SecretDescriptor,
curMap map[string]*v1alpha1.ObjectVersion,
) (v []*SecretValue, e error) {
// Fetch parameters in batches and build up the results in values
descLen := len(descriptors)
for i := 0; i < descLen; i += batchSize {
end := min(i+batchSize, descLen) // Calculate slice end.
batchDescriptors := descriptors[i:end]
batchValues, batchErrors := p.fetchParameterStoreValue(ctx, batchDescriptors, curMap)
if batchErrors != nil {
return nil, batchErrors
}
v = append(v, batchValues...)
}
return v, nil
}