Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native core subtree graft - attempt #2 #17

Merged
merged 1,008 commits into from
Sep 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1008 commits
Select commit Hold shift + click to select a range
83f5f39
Merge branch 'v1.0.x' of https://github.com/grpc/grpc
nicolasnoble Aug 19, 2016
dc9eded
Fix typo in node.js README
hacfi Sep 7, 2016
4159622
Add a libuv endpoint to the C core, for use in the Node library
murgatroid99 Sep 16, 2016
e6d7d78
Merge branch 'master' into uv_core_transport
murgatroid99 Sep 16, 2016
bc2693e
Fix mismatched new[] and delete in Node extension code
murgatroid99 Sep 20, 2016
be51c29
Merge branch 'master' into uv_core_transport
murgatroid99 Sep 23, 2016
82f490c
Compiles with npm install --debug option.
tcr Sep 26, 2016
780c16a
Remove deprecated V8 function call in Node library
murgatroid99 Sep 27, 2016
84505a9
UV tests pass on linux
murgatroid99 Oct 7, 2016
b9a3672
Fix how Node touches an internal core header
murgatroid99 Oct 7, 2016
6ad0350
Update README.md
jtattermusch Oct 12, 2016
50ac047
Merge pull request #8354 from grpc/v1.0.x
jtattermusch Oct 12, 2016
e91c255
Merge branch 'master' into uv_core_transport
murgatroid99 Oct 12, 2016
77318b1
Create benchmark client and server for Node Express
murgatroid99 Oct 18, 2016
5280def
Fix issues with express benchmark and synchronize package.json with t…
murgatroid99 Oct 18, 2016
4c016b1
Merge pull request #8208 from tcr/master
murgatroid99 Oct 21, 2016
cd84e73
Compiles with npm install --debug option.
tcr Sep 26, 2016
413bc73
Merge branch 'master' into uv_core_transport
murgatroid99 Oct 21, 2016
119fa4c
change unimplemented_method to unimplemented_service. Add real unimpl…
ncteisen Oct 22, 2016
6d754b2
added new test to interop_sanity_test.js
ncteisen Oct 24, 2016
411c019
Merge remote-tracking branch 'upstream/v1.0.x' into node_package_updates
murgatroid99 Oct 24, 2016
f741272
Remove deprecated V8 function call in Node library
murgatroid99 Sep 27, 2016
0d67981
Merge pull request #8220 from murgatroid99/node_remove_deprecated_fun…
murgatroid99 Oct 25, 2016
5eca1db
Merge branch 'master' into uv_core_transport
murgatroid99 Oct 25, 2016
ef116f0
Remove status message check from node interop client
ncteisen Oct 25, 2016
12b8b9f
Merge pull request #8449 from ncteisen/new_python_interop_tests
ncteisen Oct 26, 2016
4f0ad46
Merge branch 'master' into node_electron_build
murgatroid99 Oct 26, 2016
ead0505
Going 1.0.1.
nicolasnoble Oct 26, 2016
d6813a8
s/gpr_slice/grpc_slice, and move around tests, impls
ctiller Oct 26, 2016
bcb4592
Merge branch 'buffer_pools_for_realsies' into grpc_slice
ctiller Oct 27, 2016
963b340
s/GPR_SLICE/GRPC_SLICE/g
ctiller Oct 27, 2016
be8fc81
Merge pull request #8419 from murgatroid99/node_express_benchmark
murgatroid99 Oct 28, 2016
de3e282
Merge github.com:grpc/grpc into grpc_slice
ctiller Oct 28, 2016
22b2e81
Merge remote-tracking branch 'upstream/v1.0.x' into v1.0.1_upmerge
murgatroid99 Oct 28, 2016
49c1987
Merge github.com:grpc/grpc into grpc_slice
ctiller Oct 31, 2016
b601e95
Add test scripts for electron
murgatroid99 Nov 1, 2016
2299242
Merge branch 'master' into node_electron_build
murgatroid99 Nov 1, 2016
48d662f
Refactor uv/non-uv code in Node extension
murgatroid99 Nov 1, 2016
4ef1c5f
Some slice and resource quota updates to UV and Node code
murgatroid99 Nov 9, 2016
9579512
Make Node library compatible with lodash 3
murgatroid99 Nov 14, 2016
d0402e0
Node: correctly bubble up errors caused by non-serializable writes
murgatroid99 Nov 30, 2016
15d4875
Also propagate serialization errors in unary server responses
murgatroid99 Dec 1, 2016
5c8df43
Add missing return
murgatroid99 Dec 1, 2016
f8e550c
Merge branch 'master' into node_electron_build
murgatroid99 Dec 5, 2016
bd31bf0
Replace usages of std::list with std::queue in Node extension
murgatroid99 Dec 6, 2016
0ea53cc
Perform quit operations in a useful order in Node perf tests
murgatroid99 Dec 6, 2016
1258342
Make Node extension work with slice changes
murgatroid99 Dec 13, 2016
6962aed
Make event order consistent, and make 'end' and 'error' mutually excl…
murgatroid99 Dec 14, 2016
b74d342
v1.0.x → master upmerge
nathanielmanistaatgoogle Dec 16, 2016
ce3b1be
Merge branch 'slice_with_exec_ctx' into metadata_filter
ctiller Dec 27, 2016
8dcdee2
Merge branch 'master' into node_electron_build
murgatroid99 Jan 4, 2017
6c5a2dc
Enable advanced Java interop tests.
ericgribkoff Jan 6, 2017
ee92e21
Merge github.com:grpc/grpc into fix_errors
ctiller Jan 6, 2017
06801bc
Merge pull request #8981 from murgatroid99/node_glibcxx_compatibility
murgatroid99 Jan 12, 2017
4ea131c
Merge branch 'master' into node_electron_build
murgatroid99 Jan 12, 2017
6b54221
Merge github.com:grpc/grpc into metadata_filter
ctiller Jan 17, 2017
2423da9
Revert "Metadata handling rewrite"
ctiller Jan 21, 2017
a6009e3
Revert "Revert "Metadata handling rewrite""
ctiller Jan 23, 2017
64467e9
v1.0.x → master upmerge
nathanielmanistaatgoogle Jan 23, 2017
5f151da
Merge pull request #9428 from grpc/revert-8842-metadata_filter
dgquintas Jan 23, 2017
4bd0d05
Changing versions from -dev to -pre1 on the release branch.
nicolasnoble Jan 23, 2017
4b496b1
Merge github.com:grpc/grpc into rollfwd
ctiller Jan 24, 2017
14fab04
Move parameters for all grpc_op types into their own sub-structs.
markdroth Jan 25, 2017
8cc1d01
Merge github.com:grpc/grpc into rollfwd
ctiller Jan 26, 2017
1e4f765
Fix merge error
ctiller Jan 26, 2017
a333333
Fix merge error
ctiller Jan 26, 2017
3af8756
Fix merge error
ctiller Jan 26, 2017
835f4ed
Move parameters for all grpc_op types into their own sub-structs.
markdroth Jan 25, 2017
f86d1c1
Flagging version 1.1.0.
nicolasnoble Jan 30, 2017
52132f7
Bump master version numbers
ctiller Jan 30, 2017
0162490
Node: Validate arguments to addService, fix a couple of minor issues
murgatroid99 Jan 31, 2017
672e6a3
Bump version to 1.1.1
murgatroid99 Feb 1, 2017
2d0d256
Node: fix handling/propagation of server-side serialization errors
murgatroid99 Feb 2, 2017
ae403bb
Update version to 1.1.2
murgatroid99 Feb 7, 2017
90f14f3
Node: refactor non-uv completion queue wrapping code
murgatroid99 Feb 7, 2017
6d3c2d8
Merge remote-tracking branch 'google/v1.1.x'
nicolasnoble Feb 13, 2017
b623ac3
Improve Node and libuv testing and test coverage
murgatroid99 Feb 8, 2017
4eb63a2
Fix segfault in Node server destructor
murgatroid99 Feb 22, 2017
b211f46
Bump version to v1.1.3
kpayson64 Feb 23, 2017
33f86c5
Merge remote-tracking branch 'upstream/v1.1.x' into merge_1.1.x_master
murgatroid99 Feb 23, 2017
f773a9b
Boost grpc version to v1.1.4
Mar 1, 2017
526eb67
Merge remote-tracking branch 'upstream/v1.1.x' into 1.1.x_to_master
dgquintas Mar 4, 2017
d11683d
Node: Completion queue API changes
sreecha Mar 4, 2017
4e8073a
Merge remote-tracking branch 'origin/cq_create_api_changes' into cq_c…
sreecha Mar 7, 2017
d42cc01
Bumped version to 1.3.0-dev
dgquintas Mar 9, 2017
dcfecc9
Introducing 1.2.0-pre1
dgquintas Mar 9, 2017
f831f48
Change argument validation in Server#addService
murgatroid99 Mar 9, 2017
626585e
Node add service: allow exact match to name in proto file, improve er…
murgatroid99 Mar 10, 2017
de445c9
Merge remote-tracking branch 'upstream/v1.2.x' into upmerge_v1.2.x
murgatroid99 Mar 10, 2017
3899eb6
Merge pull request #10093 from murgatroid99/node_server_method_name_f…
murgatroid99 Mar 13, 2017
e7a2f9c
Drop support for io.js, fix minor issue with node extension
murgatroid99 Mar 14, 2017
f670532
Bump 1.2.x version to pre-2
kpayson64 Mar 16, 2017
4a9346e
Upgrade Node dependency on Protobuf.js to version 6
murgatroid99 Mar 16, 2017
81b0110
Autodetect ProtoBuf.js version in grpc.loadObject
murgatroid99 Mar 17, 2017
1929a96
Going for 1.2.0
dgquintas Mar 20, 2017
1a5a191
Ensure arguments are validated before they are serialized, unskip som…
murgatroid99 Mar 20, 2017
01b0258
bump v1.2.x branch to 1.2.1-pre1
apolcyn Mar 21, 2017
1d52e73
Merge branch 'master' into cq_create_api_changes
sreecha Mar 21, 2017
d2baf4a
Improve ProtoBuf.js version heuristic, add tests for oneof decoding
murgatroid99 Mar 21, 2017
4aaea2f
Use new oneofs option in deserialize call
murgatroid99 Mar 22, 2017
d18eb94
Node changes
sreecha Mar 22, 2017
97cbda3
Merge branch 'v1.2.x' of https://github.com/grpc/grpc into upmerge-1.2.0
nicolasnoble Mar 23, 2017
4122a6e
Add enumsAsStrings option, as the original upgrade PR did
murgatroid99 Mar 24, 2017
ee092d9
Merge branch 'master' into cq_create_api_changes
sreecha Mar 24, 2017
210f6cb
bump v1.2.x branch version to 1.2.1-pre2
apolcyn Mar 24, 2017
43851e5
Merge branch 'master' into node_protobuf_js_6_upgrade
murgatroid99 Mar 24, 2017
b5a6892
Bump version to 1.2.1
kpayson64 Mar 29, 2017
4d06401
Call ref/unref, bugfixes
ctiller Mar 31, 2017
0e6f3db
Improve Node benchmarks, add generic unary test
murgatroid99 Mar 31, 2017
4f96b84
Large message latency improvements: remove a memcpy and a Buffer cons…
murgatroid99 Mar 31, 2017
96b2971
bump version to 1.2.2
jtattermusch Apr 3, 2017
54e008c
Properly unref some slices in Node glue code
murgatroid99 Apr 3, 2017
bac6f2a
Fix serializer error handling, update ProtoBuf.js dependency
murgatroid99 Apr 3, 2017
2ecbbe0
Keep changes from #10093
murgatroid99 Apr 3, 2017
3b58459
Fix call destruction bug
murgatroid99 Apr 4, 2017
6924a20
Fix a couple of issues with the use of the Protobuf.js API
murgatroid99 Apr 4, 2017
12d1b2d
Merge github.com:grpc/grpc into cpparena
ctiller Apr 5, 2017
694d3cc
Merge branch 'master' into node_protobuf_js_6_upgrade
murgatroid99 Apr 5, 2017
6d1edad
Merge remote-tracking branch 'upstream/v1.2.x' into upmerge_v12x
jtattermusch Apr 6, 2017
90bb8a9
Node: fix leak of sent metadata
murgatroid99 Apr 6, 2017
f443ffd
Correct use of ProtoBuf.js 6 message encoding API
murgatroid99 Apr 6, 2017
76130a5
Merge branch 'master' into cq_create_api_changes
sreecha Apr 6, 2017
60a0ed4
Node: consolidate call destruction logic
murgatroid99 Apr 6, 2017
b3448c6
Merge branch 'cq_create_api_changes' into cq_lockfree
sreecha Apr 6, 2017
f220d89
Merge pull request #10503 from murgatroid99/node_memory_leak_2
murgatroid99 Apr 7, 2017
836687c
Merge pull request #10468 from murgatroid99/node_call_destruction_bug
murgatroid99 Apr 7, 2017
b11cb28
Merge pull request #10500 from jtattermusch/upmerge_v12x
jtattermusch Apr 7, 2017
4a2065d
Ignore a couple of errors in the Node express benchmark
murgatroid99 Apr 7, 2017
e367327
Bump version to 1.2.3
murgatroid99 Apr 7, 2017
3511560
Merge branch 'master' into cq_lockfree
sreecha Apr 7, 2017
48c83ce
Merge branch 'master' into cq_create_api_changes
sreecha Apr 7, 2017
bd150af
Merge branch 'cq_create_api_changes' into cq_lockfree
sreecha Apr 7, 2017
a43dd4c
Ignore a couple of errors in the Node express benchmark
murgatroid99 Apr 7, 2017
46f70ce
Merge branch 'master' into new_tsi
Apr 10, 2017
1e1b832
Merge branch 'master' into cq_create_api_changes
sreecha Apr 10, 2017
0b92f44
Merge branch 'master' into cq_lockfree
sreecha Apr 10, 2017
ee80684
Merge branch 'cq_create_api_changes' into cq_lockfree
sreecha Apr 10, 2017
25d8d5b
Refactor tag completion handling into one function
murgatroid99 Apr 10, 2017
da129b2
Add native tag completion callbacks, dispose of server after tryShutd…
murgatroid99 Apr 10, 2017
8b37153
Move ForceShutdown completion handling to new OnComplete method
murgatroid99 Apr 11, 2017
902527e
Node server: add NULL check to tryShutdown
murgatroid99 Apr 11, 2017
8b7472f
Only delete core-level server if shutdown was successful
murgatroid99 Apr 11, 2017
48ba0d0
Merge remote-tracking branch 'upstream/v1.2.x' into HEAD
jtattermusch Apr 12, 2017
dad63fe
Merge github.com:grpc/grpc into cpparena
ctiller Apr 12, 2017
ecf89f1
Bump version to 1.2.4
murgatroid99 Apr 12, 2017
d003e30
Remove API
ctiller Apr 12, 2017
857a8fd
Merge github.com:grpc/grpc into cpparena
ctiller Apr 12, 2017
1f521d3
Merge branch 'master' into cq_create_api_changes
sreecha Apr 13, 2017
0eb68f9
Merge github.com:grpc/grpc into hybrid
ctiller Apr 13, 2017
d863787
Merge remote-tracking branch 'upstream/v1.2.x' into upmerge_1.2.4
murgatroid99 Apr 13, 2017
dbaf97f
Merge branch 'master' into cq_lockfree
sreecha Apr 13, 2017
24293f8
Merge branch 'cq_create_api_changes' into cq_lockfree
sreecha Apr 13, 2017
5706b9c
1.3.x branch cut
dgquintas Apr 13, 2017
6c175a3
master to 1.4.0-dev
dgquintas Apr 13, 2017
67bdc5a
Merge branch 'master' into cq_create_api_changes
sreecha Apr 13, 2017
ba33736
Merge remote-tracking branch 'upstream/v1.3.x' into master_merge_1.3
dgquintas Apr 13, 2017
c5cb93c
Merge branch 'master' into cq_create_api_changes
sreecha Apr 14, 2017
1b81552
Merge branch 'master' into cq_lockfree
sreecha Apr 14, 2017
991f0b1
Merge github.com:grpc/grpc into cpparena
ctiller Apr 14, 2017
fdde9b8
Merge github.com:grpc/grpc into hybrid
ctiller Apr 14, 2017
c52c60f
Merge branch 'master' into new_tsi
Apr 15, 2017
12fdb41
Node benchmarks: allow arbitrary message size, add CPU usage stats
murgatroid99 Apr 18, 2017
56dc3c2
Fix typo
ctiller Apr 18, 2017
8934a59
Fix broken merge
ctiller Apr 19, 2017
e5a3658
Extend clang-format to C#, Node, Ruby
ctiller Apr 19, 2017
db70eca
Merge github.com:grpc/grpc into cpparena
ctiller Apr 19, 2017
0b6b831
Merge remote-tracking branch 'upstream/v1.3.x' into upmerge_v1.3.x
murgatroid99 Apr 19, 2017
fab8ad6
Merge pull request #10182 from ctiller/cpparena
ctiller Apr 20, 2017
c2717d1
Merge branch 'tsan-c++' into hybrid
ctiller Apr 20, 2017
397d4e5
Merge branch 'master' into cq_mpsc_based
sreecha Apr 21, 2017
65856a7
Merge branch 'master' into new_tsi
Apr 24, 2017
c084b44
Remove non-libuv code from Node extension
murgatroid99 Apr 24, 2017
662400d
Merge branch 'master' into new_tsi
Apr 24, 2017
8d89ffd
Merge branch 'master' into cq_mpsc_based
sreecha Apr 25, 2017
cf65112
Remove another from Node extension
murgatroid99 Apr 25, 2017
16dbbf4
Merge remote-tracking branch 'upstream/v1.3.x' into node_only_uv
murgatroid99 Apr 25, 2017
4e553f1
Remove another instance of '#ifdef GRPC_UV' from Node extension
murgatroid99 Apr 25, 2017
c45e3f0
Clang format
murgatroid99 Apr 25, 2017
21bc61e
Revert "Merge branch 'master' into v1.3.x"
apolcyn Apr 26, 2017
6f3bea8
Merge remote-tracking branch 'upstream/v1.3.x' into node_only_uv
murgatroid99 Apr 26, 2017
75aaa6a
Remove extra header from node_grpc.cc
murgatroid99 Apr 27, 2017
2939b2f
s/1.3.0-pre/1.3.0
dgquintas Apr 27, 2017
978f22d
1.3.0 -> 1.3.1-pre1
dgquintas Apr 27, 2017
ed48fc0
Merge commit '3049460b75ac557348243601896ed68ca8145522' into master-u…
dgquintas Apr 28, 2017
a18ea25
Remove another instance of '#ifdef GRPC_UV' from Node extension
murgatroid99 Apr 25, 2017
a87f34a
Clang format
murgatroid99 Apr 25, 2017
3b43ad9
Merge branch 'v1.3.x' into trying-to-fix-stuff
dgquintas Apr 28, 2017
856c554
Switch Protobuf.js dependency back to version 5
murgatroid99 May 2, 2017
a16643c
Fix a bit of documentation that doesn't apply to Protobuf.js 5
murgatroid99 May 2, 2017
88cf54a
Merge branch 'master' into cq_mpsc_based
sreecha May 3, 2017
134d33f
Update version to 1.3.1
murgatroid99 May 4, 2017
1120c75
Refactor client logic into superclass with generic methods, improve d…
murgatroid99 May 5, 2017
5d21890
Switch 'apply' for 'call' in pass-through functions
murgatroid99 May 9, 2017
dd1c1aa
Bump to 1.3.2-pre1
stanley-cheung May 10, 2017
c604bbe
Bump to version 1.3.2
stanley-cheung May 10, 2017
27836da
Move gRPC constants to js file to include them in generated documenta…
murgatroid99 May 10, 2017
605ec1b
Merge branch 'master' into cq_mpsc_based
sreecha May 11, 2017
d15ef28
Merge pull request #10662 from sreecha/cq_mpsc_based
sreecha May 15, 2017
9538b3d
Fix race between destroying call after status and handling write failure
murgatroid99 May 15, 2017
3b42d1e
Bump to version 1.3.3
kpayson64 May 16, 2017
d82c77e
Change write callback to asynchronous to avoid recursion
murgatroid99 May 16, 2017
ec12f1d
Merge pull request #11141 from murgatroid99/node_write_after_end_race…
murgatroid99 May 18, 2017
d6e2e59
Upmerge from v1.3.x branch to master
stanley-cheung May 18, 2017
a336bda
Fixed missed conflicts - use constants.logVerbosity instead
stanley-cheung May 18, 2017
7b9d766
Bump to version 1.3.4
apolcyn May 18, 2017
d8e9234
Update version to 1.3.5
kpayson64 May 20, 2017
5309a59
Refactor some code and document most of the API
murgatroid99 May 23, 2017
3d3dcf4
Merge branch 'master' into node_api_docs
murgatroid99 May 23, 2017
bbd820f
bump version to 1.3.6
jtattermusch May 23, 2017
9a47d04
Enable more Node performance tests, fix streaming test implementation
murgatroid99 May 24, 2017
46b78f5
Add more null checks to call methods
murgatroid99 May 25, 2017
75cc7de
Merge remote-tracking branch 'upstream/v1.3.x' into master_1.3.x_upmerge
murgatroid99 May 25, 2017
6032212
Fix node cancellation tests
murgatroid99 May 25, 2017
c669177
Merge pull request #11309 from murgatroid99/master_1.3.x_upmerge
murgatroid99 May 30, 2017
0a77296
1.4.x branch cut, version bump PR
dgquintas May 30, 2017
1fc3c87
master bumped to 1.5.x
dgquintas May 30, 2017
7f3b754
Merge pull request #11286 from murgatroid99/node_perf_tests
murgatroid99 Jun 2, 2017
44f1e26
Fix minor error in Node generated documentation
murgatroid99 Jun 5, 2017
fbe4349
change LICENSE, add AUTHORS
jtattermusch Jun 7, 2017
df61b4f
auto-fix most of licenses
jtattermusch Jun 7, 2017
f518e4e
fix remaining license notices
jtattermusch Jun 7, 2017
faae84a
Node: add test for reconnecting client after server restart
murgatroid99 Jun 9, 2017
26c4bff
Upgrade Protobuf.js 6 code to work with 6.8
murgatroid99 Jun 14, 2017
6dc71db
Fix missing return after callback in a function
murgatroid99 Jun 16, 2017
d15518e
Merge remote-tracking branch 'upstream/v1.4.x' into upmerge_1.4.x
murgatroid99 Jun 16, 2017
eb5c93f
Add another missing return after a callback
murgatroid99 Jun 19, 2017
59aab66
Fix racy Node reconnect test
murgatroid99 Jun 19, 2017
a7063d8
Merge pull request #11515 from murgatroid99/node_fix_write_control_flow
murgatroid99 Jun 19, 2017
5cca21a
Merge pull request #11536 from murgatroid99/node_fix_racy_test
murgatroid99 Jun 19, 2017
c633e30
Bump to version 1.4.0
kpayson64 Jun 20, 2017
addddea
Merge pull request #11548 from kpayson64/bump_version_1_4_0
kpayson64 Jun 20, 2017
173f7a3
Node: fix status memory leak, improve tcp_uv read buffer allocation code
murgatroid99 Jun 23, 2017
ded4599
Bump version to 1.4.1
murgatroid99 Jun 27, 2017
128ed76
Merge remote-tracking branch 'upstream/v1.4.x' into master_1.4.1_upmerge
murgatroid99 Jul 6, 2017
47754bd
Use https://grpc.io consistently as the canonical URL
mehrdada Jul 10, 2017
4290654
Strawman OWNERS --> CODEOWNERS script
ctiller Jul 12, 2017
e3699f9
Reset OWNERS state
ctiller Jul 17, 2017
4052d67
Add cancellation to asynchronous security APIs.
markdroth Jul 21, 2017
02a085e
Node: fix segfault with incorrect status argument types
murgatroid99 Jul 31, 2017
417f861
Node: replace custom deprecation warning with existing solution
murgatroid99 Jul 31, 2017
a3d649c
Split tests more granularly
murgatroid99 Aug 1, 2017
418e575
Node: document that root_certs in createSsl is optional
connor4312 Aug 2, 2017
069ba65
minor fix
Aug 2, 2017
917cd86
Merge branch 'master' into tsi_grpc
Aug 2, 2017
2ce6053
Merge pull request #12003 from murgatroid99/node_fix_batch_argument_s…
murgatroid99 Aug 8, 2017
6da5b40
Master version bump to 1.7.x
dgquintas Aug 17, 2017
a37737e
Version bump to 1.6
dgquintas Aug 17, 2017
b0d51a2
First upmerge after v1.6.x branch cut
dgquintas Aug 17, 2017
3b0b6f5
Moving files into their new location.
nicolasnoble Sep 11, 2017
70d8dd5
Merge branch 'master' of ../grpc-node-core into subtree-graft
nicolasnoble Sep 11, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/grpc-native-core/.jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*_pb.js
36 changes: 36 additions & 0 deletions packages/grpc-native-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[![npm](https://img.shields.io/npm/v/grpc.svg)](https://www.npmjs.com/package/grpc)
# Node.js gRPC Library

## PREREQUISITES
- `node`: This requires `node` to be installed, version `4.0` or above. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package.

- **Note:** If you installed `node` via a package manager and the version is still less than `4.0`, try directly installing it from [nodejs.org](https://nodejs.org).

## INSTALLATION

Install the gRPC NPM package

```sh
npm install grpc
```

## BUILD FROM SOURCE
1. Clone [the grpc Git Repository](https://github.com/grpc/grpc).
2. Run `npm install --build-from-source` from the repository root.

- **Note:** On Windows, this might fail due to [nodejs issue #4932](https://github.com/nodejs/node/issues/4932) in which case, you will see something like the following in `npm install`'s output (towards the very beginning):

```
..
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
WINDOWS_BUILD_WARNING
"..\IMPORTANT: Due to https:\github.com\nodejs\node\issues\4932, to build this library on Windows, you must first remove C:\Users\jenkins\.node-gyp\4.4.0\include\node\openssl"
...
..
```

To fix this, you will have to delete the folder `C:\Users\<username>\.node-gyp\<node_version>\include\node\openssl` and retry `npm install`


## TESTING
To run the test suite, simply run `npm test` in the install location.
79 changes: 79 additions & 0 deletions packages/grpc-native-core/ext/byte_buffer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#include <string.h>

#include <nan.h>
#include <node.h>
#include "grpc/byte_buffer_reader.h"
#include "grpc/grpc.h"
#include "grpc/slice.h"

#include "byte_buffer.h"
#include "slice.h"

namespace grpc {
namespace node {

using Nan::Callback;
using Nan::MaybeLocal;

using v8::Function;
using v8::Local;
using v8::Object;
using v8::Number;
using v8::Value;

grpc_byte_buffer *BufferToByteBuffer(Local<Value> buffer) {
Nan::HandleScope scope;
grpc_slice slice = CreateSliceFromBuffer(buffer);
grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1));
grpc_slice_unref(slice);
return byte_buffer;
}

namespace {
void delete_buffer(char *data, void *hint) {
grpc_slice *slice = static_cast<grpc_slice *>(hint);
grpc_slice_unref(*slice);
delete slice;
}
}

Local<Value> ByteBufferToBuffer(grpc_byte_buffer *buffer) {
Nan::EscapableHandleScope scope;
if (buffer == NULL) {
return scope.Escape(Nan::Null());
}
grpc_byte_buffer_reader reader;
if (!grpc_byte_buffer_reader_init(&reader, buffer)) {
Nan::ThrowError("Error initializing byte buffer reader.");
return scope.Escape(Nan::Undefined());
}
grpc_slice *slice = new grpc_slice;
*slice = grpc_byte_buffer_reader_readall(&reader);
grpc_byte_buffer_reader_destroy(&reader);
char *result = reinterpret_cast<char *>(GRPC_SLICE_START_PTR(*slice));
size_t length = GRPC_SLICE_LENGTH(*slice);
Local<Value> buf =
Nan::NewBuffer(result, length, delete_buffer, slice).ToLocalChecked();
return scope.Escape(buf);
}

} // namespace node
} // namespace grpc
41 changes: 41 additions & 0 deletions packages/grpc-native-core/ext/byte_buffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#ifndef NET_GRPC_NODE_BYTE_BUFFER_H_
#define NET_GRPC_NODE_BYTE_BUFFER_H_

#include <string.h>

#include <nan.h>
#include <node.h>
#include "grpc/grpc.h"

namespace grpc {
namespace node {

/* Convert a Node.js Buffer to grpc_byte_buffer. Requires that
::node::Buffer::HasInstance(buffer) */
grpc_byte_buffer *BufferToByteBuffer(v8::Local<v8::Value> buffer);

/* Convert a grpc_byte_buffer to a Node.js Buffer */
v8::Local<v8::Value> ByteBufferToBuffer(grpc_byte_buffer *buffer);

} // namespace node
} // namespace grpc

#endif // NET_GRPC_NODE_BYTE_BUFFER_H_
Loading