There's a lot of prior art for overriding authentication in the presence of an PUBSUB_EMULATOR_HOST environment variable. I'm opening this issue to get feedback on supporting it for the default GoogleApiClient implementation.
Basically we'd look for the var at runtime, and when present, use its value as the base url and set a fake token generator.
This will need to be per-implementation, but we have prepare_to_connect on the Client behaviour for that.
The only thing I'm not wild about is that the GoogleApiClient implementation would need to reach into the :google_api_pub_sub app config to override the base_url.
Still, personally I'd like to see this implemented, as the required configuration steps are non-trivial, especially if you're coming from somewhere like the Python PubSub client, where you can just set an env var to use the emulator.
Original comment:
peburrows/goth#56 (comment)
/cc @matehat
There's a lot of prior art for overriding authentication in the presence of an
PUBSUB_EMULATOR_HOSTenvironment variable. I'm opening this issue to get feedback on supporting it for the default GoogleApiClient implementation.Basically we'd look for the var at runtime, and when present, use its value as the base url and set a fake token generator.
This will need to be per-implementation, but we have
prepare_to_connecton the Client behaviour for that.The only thing I'm not wild about is that the GoogleApiClient implementation would need to reach into the
:google_api_pub_subapp config to override the base_url.Still, personally I'd like to see this implemented, as the required configuration steps are non-trivial, especially if you're coming from somewhere like the Python PubSub client, where you can just set an env var to use the emulator.
Original comment:
peburrows/goth#56 (comment)
/cc @matehat