How to use the Channel function from bindings
Find comprehensive JavaScript bindings.Channel code examples handpicked from public code repositorys.
GitHub: caryx/Test
59 60 61 62 63 64 65 66 67 68 69
describe('channel', function() { describe('constructor', function() { it('should require a string for the first argument', function() { assert.doesNotThrow(function() { new grpc.Channel('hostname', insecureCreds); }); assert.throws(function() { new grpc.Channel(); }, TypeError);
1
0
0
+ 31 other calls in file
GitHub: caryx/Test
630 631 632 633 634 635 636 637 638 639
options = {}; } options['grpc.primary_user_agent'] = 'grpc-node/' + version; /* Private fields use $ as a prefix instead of _ because it is an invalid * prefix of a method name */ this.$channel = new grpc.Channel(address, credentials, options); // Remove the optional DNS scheme, trailing port, and trailing backslash address = address.replace(/^(dns:\/{3})?([^:\/]+)(:\d+)?\/?$/, '$2'); this.$server_address = address; this.$auth_uri = 'https://' + this.$server_address + '/' + serviceName;
1
0
0
+ 4 other calls in file
GitHub: gameduell/kythe
485 486 487 488 489 490 491 492 493 494
} else { this.updateMetadata = function(metadata, callback) { callback(null, metadata); }; } this.channel = new grpc.Channel(address, options); } _.each(methods, function(attrs, name) { var method_type;
0
1
0
+ 2 other calls in file
GitHub: caryx/Test
64 65 66 67 68 69 70 71 72 73
before(function() { server = new grpc.Server(); var port_num = server.addHttp2Port('0.0.0.0:0', grpc.ServerCredentials.createInsecure()); server.start(); channel = new grpc.Channel('localhost:' + port_num, insecureCreds); }); after(function() { server.forceShutdown(); });
1
0
0
+ 2 other calls in file
GitHub: caryx/Test
55 56 57 58 59 60 61 62 63 64
before(function() { server = new grpc.Server(); var port = server.addHttp2Port('localhost:0', grpc.ServerCredentials.createInsecure()); server.start(); channel = new grpc.Channel('localhost:' + port, insecureCreds); }); after(function() { server.forceShutdown(); });
1
0
0
+ 3 other calls in file
103 104 105 106 107 108 109 110 111 112
new grpc.Channel('hostname', insecureCreds, {'key' : new Date()}); }); }); it('should succeed without the new keyword', function() { assert.doesNotThrow(function() { var channel = grpc.Channel('hostname', insecureCreds); assert(channel instanceof grpc.Channel); }); }); });
0
0
0
+ 67 other calls in file
bindings.createKey is the most popular function in bindings (8616 examples)