Till Knuesting
f67c5e779f
preallocated slices ( #917 )
2019-11-05 17:43:12 +00:00
Milos Gajdos
3d5d9be02a
Avoid recursive calls to RLock()
...
Topology calls itsel recursively invoking RLock. This, according to go
documentation is wrong. This commit moves the body of Topology function
to a non-thread safe unexported function to keep locsk at check!
2019-10-18 11:26:43 +01:00
Asim Aslam
5c38f38dd9
No need to lock here since Topology read locks and makes copies
2019-10-18 11:26:43 +01:00
Asim Aslam
b1fed01752
add network name to node
2019-10-14 22:26:23 +01:00
Milos Gajdos
a38482ffcb
Remove data race; Unlock once done pruning/deleting
2019-09-19 11:53:13 +01:00
Milos Gajdos
a72a2f717d
Prune stale nodes in the whole topology.
2019-09-16 19:22:55 +01:00
Milos Gajdos
2599ee8591
Prune routes routable via dead node.
2019-09-15 12:17:12 +01:00
Milos Gajdos
323a72be34
Small refactoring; Split horizon loop break.
2019-09-13 18:46:24 +01:00
Milos Gajdos
b91c3147e7
Node API allows us to drop all network locks
...
Network locks are now needed only when accessing client map. node map
access is serialied with the node mutex.
2019-09-13 03:03:56 +01:00
Milos Gajdos
77c6c9781b
getProtoTopology has been replaced by PeersToProto
...
This helps us remove redundant code across node and handler
2019-09-13 03:03:56 +01:00
Milos Gajdos
fa4ff8921e
Removed redundant lock. Simplified proto topology
2019-09-13 03:03:56 +01:00
Milos Gajdos
d6be91e8af
Changed RPC methods. Changed Network interface.
...
* Nodes/Topology removed from public methods from Network interface
* Peers() returns max depth 3 topology
* handler.Topology rpc endpoint removed
* handler.Peers rpc endpoint accept "depth" param to return max depth peers
2019-09-13 03:03:56 +01:00
Milos Gajdos
588484c3bf
Fixed some races. Added more tests.
2019-09-13 03:03:56 +01:00
Milos Gajdos
2dfbe93d65
Added more node tests. Small refactoring of Netowkr and handler.
2019-09-13 03:03:55 +01:00
Milos Gajdos
16fcf1fbda
Nodes, Peers and Topology methods for node
...
Topology accepts an argument to define the depth of the topology
requested from the network. proto definitions have been modified
accordingly, too.
2019-09-13 03:03:55 +01:00
Milos Gajdos
cbce5490d7
Lock the Nodes method properly when collecting them.
2019-09-13 03:03:55 +01:00
Milos Gajdos
195c6a8c90
Neighbour is now peer. Neighbourhood is Peers. Small refactor.
2019-09-13 03:03:54 +01:00
Milos Gajdos
f91d0408ab
Moved node implementation into dedicated source file
2019-09-13 03:03:54 +01:00
Asim Aslam
608a1f8add
remove node code
2019-07-08 16:25:04 +01:00
Asim Aslam
e0bf1c2283
Remove Port from registry
2019-07-08 08:01:42 +01:00
Asim Aslam
777a203f96
gofmt
2019-07-07 12:33:54 +01:00
Asim Aslam
d2d6841f02
Move transport to network/transport
2019-07-07 10:37:34 +01:00
Asim Aslam
eafc930f84
Change network id to name
2019-07-07 10:10:38 +01:00
Asim Aslam
2644497ccb
Fix some link connection logic
2019-07-03 19:51:40 +01:00
Asim Aslam
e54de56376
Functional loopback code
2019-07-03 19:26:24 +01:00
Asim Aslam
f619e46def
Some functioning network code
2019-07-02 20:54:21 +01:00
Asim Aslam
543dc0166c
Restructure network things before moving
2019-07-02 08:45:00 +01:00