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 {
53
53
readonly actor : IClientActorBuilder ;
54
54
55
55
constructor (
56
- daprHost = Settings . getDefaultHost ( )
56
+ daprHost ?: string
57
57
, daprPort ?: string
58
58
, communicationProtocol : CommunicationProtocolEnum = CommunicationProtocolEnum . HTTP
59
59
, options : DaprClientOptions = {
60
60
isKeepAlive : true
61
61
}
62
62
) {
63
- this . daprHost = daprHost ;
63
+ this . daprHost = daprHost ?? Settings . getDefaultHost ( ) ;
64
64
this . daprPort = daprPort ?? Settings . getDefaultPort ( communicationProtocol ) ;
65
65
this . communicationProtocol = communicationProtocol ;
66
66
this . options = options ;
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ export default class GRPCClient implements IClient {
20
20
isKeepAlive : true
21
21
}
22
22
) {
23
- this . clientHost = host ?? Settings . getDefaultHost ( ) ;
24
- this . clientPort = port ?? Settings . getDefaultGrpcPort ( ) ;
23
+ this . clientHost = host ;
24
+ this . clientPort = port ;
25
25
this . clientCredentials = ChannelCredentials . createInsecure ( ) ;
26
26
this . options = options ;
27
27
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default class HTTPClient implements IClient {
24
24
}
25
25
) {
26
26
this . clientHost = host ;
27
- this . clientPort = port ?? port ;
27
+ this . clientPort = port ;
28
28
this . options = options ;
29
29
30
30
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 {
36
36
readonly client : DaprClient ;
37
37
38
38
constructor (
39
- serverHost = Settings . getDefaultHost ( )
39
+ serverHost ?: string
40
40
, serverPort ?: string
41
- , daprHost = Settings . getDefaultHost ( )
41
+ , daprHost ?: string
42
42
, daprPort ?: string
43
43
, communicationProtocol : CommunicationProtocolEnum = CommunicationProtocolEnum . HTTP
44
44
, clientOptions : DaprClientOptions = {
45
45
isKeepAlive : true
46
46
}
47
47
) {
48
- this . serverHost = serverHost ;
48
+ this . serverHost = serverHost ?? Settings . getDefaultHost ( ) ;
49
49
this . serverPort = serverPort ?? Settings . getDefaultAppPort ( communicationProtocol ) ;
50
- this . daprHost = daprHost ;
50
+ this . daprHost = daprHost ?? Settings . getDefaultHost ( ) ;
51
51
this . daprPort = daprPort ?? Settings . getDefaultPort ( communicationProtocol ) ;
52
52
53
53
// Create a client to interface with the sidecar from the server side
You can’t perform that action at this time.
0 commit comments