Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
4c870f42
Commit
4c870f42
authored
May 11, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NodeId type change to string of DiscoveryOptions for Consul. #314
parent
ab8a38a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
GatewayProxyMiddleware.cs
...Core.CAP/Dashboard/GatewayProxy/GatewayProxyMiddleware.cs
+1
-1
CAP.DiscoveryOptions.cs
src/DotNetCore.CAP/NodeDiscovery/CAP.DiscoveryOptions.cs
+2
-1
INodeDiscoveryProvider.Consul.cs
...etCore.CAP/NodeDiscovery/INodeDiscoveryProvider.Consul.cs
+1
-1
No files found.
src/DotNetCore.CAP/Dashboard/GatewayProxy/GatewayProxyMiddleware.cs
View file @
4c870f42
...
@@ -57,7 +57,7 @@ namespace DotNetCore.CAP.Dashboard.GatewayProxy
...
@@ -57,7 +57,7 @@ namespace DotNetCore.CAP.Dashboard.GatewayProxy
{
{
//For performance reasons, we need to put this functionality in the else
//For performance reasons, we need to put this functionality in the else
var
isSwitchNode
=
request
.
Cookies
.
TryGetValue
(
NodeCookieName
,
out
var
requestNodeId
);
var
isSwitchNode
=
request
.
Cookies
.
TryGetValue
(
NodeCookieName
,
out
var
requestNodeId
);
var
isCurrentNode
=
discoveryOptions
.
NodeId
.
ToString
()
==
requestNodeId
;
var
isCurrentNode
=
discoveryOptions
.
NodeId
==
requestNodeId
;
var
isNodesPage
=
request
.
Path
.
StartsWithSegments
(
new
PathString
(
pathMatch
+
"/nodes"
));
var
isNodesPage
=
request
.
Path
.
StartsWithSegments
(
new
PathString
(
pathMatch
+
"/nodes"
));
if
(!
isSwitchNode
||
isCurrentNode
||
isNodesPage
)
if
(!
isSwitchNode
||
isCurrentNode
||
isNodesPage
)
...
...
src/DotNetCore.CAP/NodeDiscovery/CAP.DiscoveryOptions.cs
View file @
4c870f42
...
@@ -30,8 +30,9 @@ namespace DotNetCore.CAP
...
@@ -30,8 +30,9 @@ namespace DotNetCore.CAP
public
string
CurrentNodeHostName
{
get
;
set
;
}
public
string
CurrentNodeHostName
{
get
;
set
;
}
public
int
CurrentNodePort
{
get
;
set
;
}
public
int
CurrentNodePort
{
get
;
set
;
}
public
int
NodeId
{
get
;
set
;
}
public
string
NodeId
{
get
;
set
;
}
public
string
NodeName
{
get
;
set
;
}
public
string
NodeName
{
get
;
set
;
}
public
string
MatchPath
{
get
;
set
;
}
public
string
MatchPath
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/NodeDiscovery/INodeDiscoveryProvider.Consul.cs
View file @
4c870f42
...
@@ -72,7 +72,7 @@ namespace DotNetCore.CAP.NodeDiscovery
...
@@ -72,7 +72,7 @@ namespace DotNetCore.CAP.NodeDiscovery
{
{
return
_consul
.
Agent
.
ServiceRegister
(
new
AgentServiceRegistration
return
_consul
.
Agent
.
ServiceRegister
(
new
AgentServiceRegistration
{
{
ID
=
_options
.
NodeId
.
ToString
()
,
ID
=
_options
.
NodeId
,
Name
=
_options
.
NodeName
,
Name
=
_options
.
NodeName
,
Address
=
_options
.
CurrentNodeHostName
,
Address
=
_options
.
CurrentNodeHostName
,
Port
=
_options
.
CurrentNodePort
,
Port
=
_options
.
CurrentNodePort
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment