fergusstrange / embedded-postgres

Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test
MIT License
854 stars 89 forks source link

Enable custom remote fetch #52

Closed aloksinhanov closed 2 years ago

aloksinhanov commented 3 years ago

Modified the lib to allow to specify a custom remote fetch strategy and a custom cache locator.

fergusstrange commented 2 years ago

Hi @aloksinhanov looks like there are a few failing builds above which you'll need to resolve in order to progress this.

Regarding overriding the custom fetch strategy is it just the URL you wish to override or the entire strategy? We probably could add the URL to call to the config rather than exposing a number of the core library functions.

Thanks

survivorbat commented 2 years ago

Was also looking to add my own fetch strategy to attempt to debug why unzipping the fetched file fails, although there is a 'defaultRemoteFetchStrategy' I can't find any way to override it

aloksinhanov commented 2 years ago

Hi @aloksinhanov looks like there are a few failing builds above which you'll need to resolve in order to progress this.

Regarding overriding the custom fetch strategy is it just the URL you wish to override or the entire strategy? We probably could add the URL to call to the config rather than exposing a number of the core library functions.

Thanks

Hi, the intent was to avoid downloading the embedded postgres artifacts and use it from a pre-defined location. I later realized that if I pre-download the artifacts into the cache location this lib looks into, the download would not happen automatically. So, I don't think this code change adds much value than what this lib is already capable of.

Thanks, Alok