Tim
8521b61af8
Merge branch 'hide-docs' into 'master'
...
Hide helper macros from tarpc documentation
See merge request !4
2016-01-18 11:13:46 +05:30
Adam Wright
a7a3f47c1a
Hide helper macros from tarpc documentation
2016-01-17 20:52:26 -08:00
Adam Wright
6823bab23e
Merge branch 'remove-error-sender' into 'master'
...
Remove Error::Sender
It was dead code
See merge request !2
2016-01-15 14:44:39 +05:30
Tim Kuehn
e74058dbde
Merge branch 'orderly-shutdown'
2016-01-15 01:10:28 -08:00
Tim Kuehn
dccaa88c80
Remove unused Error::Sender
2016-01-15 01:10:18 -08:00
Adam Wright
1402a6fff1
Merge branch 'orderly-shutdown' into 'master'
...
Orderly shutdown of serving threads when calling ServeHandle::shutdown.
Use condition variable server-side. Change client-side reader thread to empty the sender hashmap before returning.
See merge request !1
2016-01-15 14:08:11 +05:30
Tim Kuehn
001b1b1e43
Only join reader thread if tcp stream shutdown succeeded.
2016-01-15 00:34:36 -08:00
Tim Kuehn
ebd825e679
Bundle of small changes.
...
1. Rename OpenConnections => InflightRpcs, as it represents all current rpc calls being processed.
2. Change Packet from a tuple struct to a regular struct, to clarify its fields.
3. Lower log statements from WARN to INFO where appropriate.
4. Remove shutdown method on ConnectionHandler to disambiguate with the shutdown field.
5. Add a test of client behavior when calling rpc on a client whose stream closed.
2016-01-15 00:28:45 -08:00
Tim Kuehn
e4faff74be
reformat
2016-01-14 20:45:09 -08:00
Tim Kuehn
b3ed2ef0ba
Remove all shutdown logic. Just exit and deal with it.
2016-01-14 20:41:29 -08:00
Tim Kuehn
06e1eaa27a
Make Serve's Request and Reply associated types.
2016-01-14 20:31:28 -08:00
Tim Kuehn
d81b37b35d
Cargo fmt
2016-01-14 09:23:34 -08:00
Tim Kuehn
0df3cfdd98
Properly wait for spawned connection handler threads to shutdown. Set client timeout to None in tests.
2016-01-14 09:22:46 -08:00
Tim Kuehn
8c51d2ca1b
Cargo fmt
2016-01-14 01:55:25 -08:00
Tim Kuehn
2644bf0d9b
Ensure no rpc calls can be started once the reader thread returns.
2016-01-14 01:53:28 -08:00
Tim Kuehn
91053b96c0
Orderly shutdown of serving threads when calling ServeHandle::shutdown.
2016-01-14 01:09:47 -08:00
Tim Kuehn
f7bc1586c2
Merge branch 'master' of ssh://git.adam-wright.net:10022/shaladdle/tarpc
2016-01-13 00:21:28 -08:00
Adam Wright
6e37d3a37e
Fix pre-push/commit hooks so they work.
...
- Move them back to the root directory of the repo
- Explicitly specify the path to the manifest we are running tests for
2016-01-12 23:35:53 -08:00
Tim Kuehn
7c34e06959
Add doc comment functionality
2016-01-12 23:09:59 -08:00
Tim Kuehn
0d77959625
Move readme back to root
2016-01-12 22:03:19 -08:00
Tim Kuehn
1f4a72b0f9
Clean up the syntax; add the README.md (I forgot to git add it last time)
2016-01-12 21:54:01 -08:00
Tim Kuehn
adb77924e2
Move README.md to the proper package
2016-01-12 20:23:30 -08:00
Tim Kuehn
3031bd7cb0
Require rpc fns to be written in anticipation of allowing arbitrary items in the generated module
2016-01-12 20:23:00 -08:00
Tim Kuehn
27d80adf06
Merge branch 'master' of ssh://git.adam-wright.net:10022/shaladdle/tarpc
2016-01-12 20:20:49 -08:00
Tim Kuehn
9576b724ad
Switch to bincode
2016-01-12 01:13:37 -08:00
Adam Wright
7e9d16eefe
Add a readme.
2016-01-12 13:17:44 +05:30
Tim Kuehn
6141b295d1
Add a tarpc_examples package
2016-01-11 23:39:58 -08:00
Tim Kuehn
6a484c48c5
Obfuscate types internal to the generated module to reduce risk of collision with imports.
...
We don't support imports in the macro yet, but this commit will prevent problems when we do.
2016-01-11 22:54:53 -08:00
Tim Kuehn
1544712bc4
Move protocol::Error and protocol::Result to crate root
2016-01-11 22:39:46 -08:00
Tim Kuehn
6f634c50cc
Add doc comment to generated module
2016-01-11 20:10:31 -08:00
Tim Kuehn
0256dc1c1a
A few comments on macros
2016-01-11 00:56:40 -08:00
Tim Kuehn
212f0bb7aa
Fix issue where service fns with no args would cause compile errors
2016-01-11 00:51:24 -08:00
Tim Kuehn
dca55d4310
Make the generated rpc module public
2016-01-10 18:39:33 -08:00
Adam Wright
1e42547ca4
Remove crap we don't need, actually fail on test result
2016-01-10 18:01:21 -08:00
Adam Wright
200a06ac57
Print FAIL in red.
2016-01-10 17:51:15 -08:00
Adam Wright
ea24921eff
Just go to a simple world where we check the branch we're on
2016-01-10 17:49:18 -08:00
Adam Wright
d906357ad8
Say we're done at the end.
2016-01-10 17:49:18 -08:00
Adam Wright
0d61812a3f
Updated error message when you're not on a branch
...
And fix uncommitted changes detection
2016-01-10 17:49:18 -08:00
Adam Wright
ab92f90aff
Don't try to stash, just tell the user they're dumb.
2016-01-10 17:49:18 -08:00
Adam Wright
0aa2661f02
Pre-push hook that rejects branches with non-passing tests
2016-01-10 17:49:18 -08:00
Adam Wright
3ea0f6fbb5
WIP
2016-01-10 17:49:18 -08:00
Tim Kuehn
0f5ef5f575
Move macros crate into a module in tarpc crate
2016-01-10 15:48:32 -08:00
Tim Kuehn
82cc7b3303
Fix tests
2016-01-10 15:01:40 -08:00
Tim Kuehn
87f71b5549
Document all public items and deny(missing_docs)
2016-01-10 14:27:19 -08:00
Adam Wright
56bd362fb1
Modify serve_async to expose the bound address
...
serve_async was taking a SocketAddr, and then binding to it. This is fine if
your'e always sure of the exact address you want to bind to, but in some cases
you don't know.
One such case is when you want the OS to assign you and ephemeral port number,
like we do in our tests. In this case, you pass 0.0.0.0:0 as the address, and
then call bind. After that, you don't know which address the listener bound to,
so we can't make the subsequent call to TcpStream::connect without getting a
weird error.
This is fixed by the ServeHandle object exposing a local_addr() method, which
returns the address that the listener bound to.
2016-01-10 02:29:06 -08:00
Tim Kuehn
fae09e3fed
Fix doc test
2016-01-09 14:44:30 -08:00
Adam Wright
5e34e32094
Generate an unused enum variant to fix a compiler error
...
Previously if you made a service with a single rpc it would generate an error
because of a redundant match statement.
2016-01-09 14:26:02 -08:00
Tim Kuehn
3bf2d1f16d
Fix syntax and add doc comments to public items created in the macro
2016-01-09 14:24:16 -08:00
Tim Kuehn
7c89df7b09
Rustfmt
2016-01-09 14:23:55 -08:00
Tim Kuehn
b17b8c60d4
Remove failed requests from requests map. Fix #14 .
2016-01-09 13:02:23 -08:00