Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
e709404a
Commit
e709404a
authored
6 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
803ca3cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
go/neo/neo_test.go
go/neo/neo_test.go
+9
-1
No files found.
go/neo/
cluster
_test.go
→
go/neo/
neo
_test.go
View file @
e709404a
...
...
@@ -117,6 +117,8 @@ func masterStartReady(where string, ready bool) *eventMStartReady {
// ---- events routing ----
// EventRouter implements NEO-specific routing of events to trace test channels.
//
// A test has to define routing rules using BranchNode, BranchState and BranchLink XXX
type
EventRouter
struct
{
mu
sync
.
Mutex
...
...
@@ -132,6 +134,8 @@ type EventRouter struct {
// event on a-b link
byLink
map
[
string
/*host-host*/
]
*
linkDst
// who connected who, so that it is possible to determine by looking at
// connID who initiated the exchange.
connected
map
[
string
/*addr-addr*/
]
bool
}
...
...
@@ -187,7 +191,7 @@ func host(addr string) string {
return
host
}
// Route routes events according to rules specified via Branch*()
// Route routes events according to rules specified via Branch*()
.
func
(
r
*
EventRouter
)
Route
(
event
interface
{})
(
dst
*
tracetest
.
SyncChan
)
{
r
.
mu
.
Lock
()
defer
r
.
mu
.
Unlock
()
...
...
@@ -316,6 +320,10 @@ func (r *EventRouter) BranchLink(link string, dsta, dstb *tracetest.SyncChan) {
r
.
byLink
[
link
]
=
&
linkDst
{
dsta
,
dstb
}
}
// linkDst represents destination for events on a network link.
//
// Events go to either a or b depending on which side initiated particular
// connection on top of the link.
type
linkDst
struct
{
a
*
tracetest
.
SyncChan
// net cause was on dialer
b
*
tracetest
.
SyncChan
// net cause was on listener
...
...
This diff is collapsed.
Click to expand it.
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