Skip to content

Commit

Permalink
feat: support uds (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Aug 1, 2023
1 parent 3a366c4 commit e6b612d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export default class Client {
this.host = host;
this.port = port;
const clientCredentials = ChannelCredentials.createInsecure();
const address = `${this.host}:${this.port}`;
let address = `${this.host}:${this.port}`;
// Support UDS
if (this.host.startsWith('unix://')) {
address = this.host;
}
this._runtime = new RuntimeClient(address, clientCredentials);
debug('Start connection to %o', address);
if (options?.ossEnable || options?.oss) {
Expand Down

0 comments on commit e6b612d

Please sign in to comment.