Skip to content

Commit

Permalink
feat: allow to override endpoint in service factory
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Zuev committed Jan 12, 2022
1 parent a712923 commit 12e118e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export class Session {
return this.config.pollInterval;
}

client<S extends ServiceDefinition>(clientClass: GeneratedServiceClientCtor<S>): WrappedServiceClientType<S> {
const endpoint = getServiceClientEndpoint(clientClass);
client<S extends ServiceDefinition>(clientClass: GeneratedServiceClientCtor<S>, customEndpoint?: string): WrappedServiceClientType<S> {
const endpoint = customEndpoint || getServiceClientEndpoint(clientClass);
const channel = createChannel(endpoint, this.channelCredentials);

return clientFactory.create(clientClass.service, channel);
Expand Down

0 comments on commit 12e118e

Please # to comment.