File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -53,14 +53,14 @@ export default class DaprClient {
5353 readonly actor : IClientActorBuilder ;
5454
5555 constructor (
56- daprHost = Settings . getDefaultHost ( )
56+ daprHost ?: string
5757 , daprPort ?: string
5858 , communicationProtocol : CommunicationProtocolEnum = CommunicationProtocolEnum . HTTP
5959 , options : DaprClientOptions = {
6060 isKeepAlive : true
6161 }
6262 ) {
63- this . daprHost = daprHost ;
63+ this . daprHost = daprHost ?? Settings . getDefaultHost ( ) ;
6464 this . daprPort = daprPort ?? Settings . getDefaultPort ( communicationProtocol ) ;
6565 this . communicationProtocol = communicationProtocol ;
6666 this . options = options ;
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export default class GRPCClient implements IClient {
2020 isKeepAlive : true
2121 }
2222 ) {
23- this . clientHost = host ?? Settings . getDefaultHost ( ) ;
24- this . clientPort = port ?? Settings . getDefaultGrpcPort ( ) ;
23+ this . clientHost = host ;
24+ this . clientPort = port ;
2525 this . clientCredentials = ChannelCredentials . createInsecure ( ) ;
2626 this . options = options ;
2727
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default class HTTPClient implements IClient {
2424 }
2525 ) {
2626 this . clientHost = host ;
27- this . clientPort = port ?? port ;
27+ this . clientPort = port ;
2828 this . options = options ;
2929
3030 if ( ! this . clientHost . startsWith ( 'http://' ) && ! this . clientHost . startsWith ( 'https://' ) ) {
Original file line number Diff line number Diff line change @@ -36,18 +36,18 @@ export default class DaprServer {
3636 readonly client : DaprClient ;
3737
3838 constructor (
39- serverHost = Settings . getDefaultHost ( )
39+ serverHost ?: string
4040 , serverPort ?: string
41- , daprHost = Settings . getDefaultHost ( )
41+ , daprHost ?: string
4242 , daprPort ?: string
4343 , communicationProtocol : CommunicationProtocolEnum = CommunicationProtocolEnum . HTTP
4444 , clientOptions : DaprClientOptions = {
4545 isKeepAlive : true
4646 }
4747 ) {
48- this . serverHost = serverHost ;
48+ this . serverHost = serverHost ?? Settings . getDefaultHost ( ) ;
4949 this . serverPort = serverPort ?? Settings . getDefaultAppPort ( communicationProtocol ) ;
50- this . daprHost = daprHost ;
50+ this . daprHost = daprHost ?? Settings . getDefaultHost ( ) ;
5151 this . daprPort = daprPort ?? Settings . getDefaultPort ( communicationProtocol ) ;
5252
5353 // Create a client to interface with the sidecar from the server side
You can’t perform that action at this time.
0 commit comments