diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 23:20:35 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2018-12-24 23:20:35 +0900 |
commit | 48fa25d06c96262779253b0b051e8d1a34604764 (patch) | |
tree | fabaad0ea3022bc15c526e6757793ce62d2b67b3 /tools/grpc/nodejs | |
parent | bb1bbdd197a971917ae24946a4c4d2da539e5d55 (diff) |
docs: delete outdated java/nodejs/ruby gRPC API examples
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'tools/grpc/nodejs')
-rw-r--r-- | tools/grpc/nodejs/get_neighbors.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tools/grpc/nodejs/get_neighbors.js b/tools/grpc/nodejs/get_neighbors.js deleted file mode 100644 index 6cc6b082..00000000 --- a/tools/grpc/nodejs/get_neighbors.js +++ /dev/null @@ -1,24 +0,0 @@ -var grpc = require('grpc'); -var api = grpc.load('gobgp.proto').gobgpapi; -var stub = new api.GobgpApi('localhost:50051', grpc.credentials.createInsecure()); - -stub.getNeighbor({}, function(err, neighbor) { - neighbor.peers.forEach(function(peer) { - if(peer.info.bgp_state == 'BGP_FSM_ESTABLISHED') { - var date = new Date(Number(peer.timers.state.uptime)*1000); - var holdtime = peer.timers.state.negotiated_hold_time; - var keepalive = peer.timers.state.keepalive_interval; - } - - console.log('BGP neighbor:', peer.conf.neighbor_address, - ', remote AS:', peer.conf.peer_as); - console.log("\tBGP version 4, remote router ID:", peer.conf.id); - console.log("\tBGP state:", peer.info.bgp_state, - ', uptime:', date); - console.log("\tBGP OutQ:", peer.info.out_q, - ', Flops:', peer.info.flops); - console.log("\tHold time:", holdtime, - ', keepalive interval:', keepalive, 'seconds'); - console.log("\tConfigured hold time:", peer.timers.config.hold_time); - }); -}); |