cloudyr / googleCloudStorageR

Google Cloud Storage API to R
https://code.markedmondson.me/googleCloudStorageR
Other
104 stars 29 forks source link

Support using GCS emulators #176

Closed manuteleco closed 1 year ago

manuteleco commented 1 year ago

Official Google Cloud Storage libraries usually allow configuring them to perform requests against a GCS emulator server, instead of the real service API.

The user can define a STORAGE_EMULATOR_HOST environment variable pointing to a emulator server. When defined, client libraries will:

It would be great to have support for GCS emulators in googleCloudStorageR as well. This is generally useful in the context of automated tests. And depending on the emulator implementation, it can even give local filesystem support to applications that were previously hardwired to use GCS.

I've already sketched a solution that I have been using for my own purposes in the last few days. I'll open a PR shortly.