132 Commits
Author SHA1 Message Date
David ColburnandGitHub 2e4bde975b RPCs queue by default (#67)
* rpcs queue by default

* leave retries to interceptor

* use new enum

* increase affinity timeout in test

* fix affinity generation
2023-08-16 14:38:06 -07:00
David ZhaoandGitHub b9d96f15f1 Added license headers (#66) 2023-07-27 16:16:48 -07:00
David ColburnandGitHub 684f32e1ca Max affinity (#65)
* max affinity

* version bump
2023-07-12 18:19:11 -04:00
Paul WellsandGitHub d6e6b7f3ac set rpc context deadline (#64)
* set rpc context deadline

* fix timestamps
2023-06-20 09:54:20 -07:00
Paul WellsandGitHub 638d2b34fc add option to use pubsub queue to select unary rpc server (#63)
* add option to use pubsub queue to select unary rpc server

* add oneof for routing options
2023-06-05 11:54:10 -07:00
Paul WellsandGitHub 6f558ac36f prevent race between stream close and pending accounting (#62)
* prevent race between stream close and pending accounting

* cleanup

* fix flaky test
2023-05-28 01:38:49 -07:00
Benjamin PrachtandGitHub 7769956827 Add not acceptable error (#61) 2023-05-18 16:43:41 -07:00
Paul WellsandGitHub 110c3a52f9 include error code in unwrapped psrpc errors (#59) 2023-05-02 08:21:50 -07:00
Paul WellsandGitHub 3b78aca8e4 mark stream closed before teardown (#58) 2023-04-24 19:56:40 -07:00
Paul WellsandGitHub 437aa25cfa use waitgroup for active work accounting (#57) 2023-04-24 18:23:09 -07:00
Paul WellsandGitHub 2da8f1326c prevent send on closed channel during read/close race (#56)
* prevent send on closed channel during read/close race

* cleanup
2023-04-23 23:44:51 -07:00
David ColburnandGitHub 3a3a2a935f Refactor (#55)
* checkpoint

* cleaned up streams

* clean up multi rpcs

* clean up rpc

* service definition, fix stream bug

* fix #54

* updates

* version bump
2023-04-21 11:14:02 -07:00
Paul WellsandGitHub af2948db73 fall back to default timeout for retries (#53) 2023-04-18 19:17:05 -07:00
Paul WellsandGitHub 3613472002 deprecate anypb payload (#52)
* deprecate anypb payloads

* test assertion descriptions
2023-04-18 00:47:54 -07:00
Paul WellsandGitHub c70741da89 guard id rand.Source with mutex (#51)
* guard id rand.Rand with mutex

* cleanup
2023-04-15 06:05:02 -07:00
Paul WellsandGitHub 097fc6fe08 improve id generation performance (#48)
* improve id generation performance

* fix mask

* naming

* init prng for legacy go
2023-04-14 09:20:29 -07:00
Paul WellsandGitHub 94c9464c40 fix stream deadlock handling malformed message (#49) 2023-04-14 08:58:43 -07:00
Paul WellsandGitHub 9191b08298 fix stream receive chan leak on open failure (#50) 2023-04-14 08:57:58 -07:00
Paul WellsandGitHub 931caf8c8f forward close in stream metrics middleware (#47) 2023-04-05 12:18:30 -07:00
Paul WellsandGitHub 2d958ca1d1 add metrics middleware (#46)
* add metrics middleware

* fix test

* cleanup

* bump version
2023-04-05 02:48:46 -07:00
Paul WellsandGitHub 6a3d09946f return stream closed error from send when remote close received (#45)
* return stream closed error from send when remote close received

* import order
2023-03-31 15:05:18 -07:00
Paul WellsandGitHub 119438e7ea ensure busses close message channels on close (#44) 2023-03-30 13:25:26 -07:00
Paul WellsandGitHub 12f7e92014 fix channel capacity and cleanup during stream open (#43) 2023-03-29 15:36:20 -07:00
Paul WellsandGitHub 6de16dbb52 prevent closing before publishing ack (#42) 2023-03-10 01:57:45 -08:00
Paul WellsandGitHub d134fc2a90 skip waiting for acks after receiving close (#41) 2023-03-08 17:27:59 -08:00
Paul WellsandGitHub f1e26a1759 return correct error from stream open timeout (#40) 2023-03-02 21:47:01 -08:00
Paul WellsandGitHub 1be627b962 v0.2.9 (#39) 2023-02-27 14:50:41 -08:00
Paul WellsandGitHub 56aabd8a1b encode req/res payload as raw bytes (#37)
* encode req/res payload as raw bytes

* dual write raw/anypb

* test backward compatible decode

* swap raw/anypb marshal

* nil safe
2023-02-27 14:37:39 -08:00
Paul WellsandGitHub 287e80b76b add option to skip claim handshake (#38)
* add option to skip claim handshake

* generate client

* cleanup

* globally_unique => single_server
2023-02-27 14:37:27 -08:00
d7520b4184 v0.2.8 (#24)
* v0.2.7

* Update version/version.go

---------

Co-authored-by: Paul Wells <[email protected]>
2023-02-23 19:24:35 -08:00
Paul WellsandGitHub 9947d0aeaa close server/deregister handler synchronously (#27)
* close server/deregister handler synchronously

there is currently no way to know if a server or handler has shut down
which causes bugs when the state thrashes thrashes. when this happens it
causes  stream registrations to enter unpredictable states and throw errors.

* missing line

* close streams on server shutdown

* eof

* test timing
2023-02-22 19:10:10 -08:00
Paul WellsandGitHub 07d9347715 add retry middleware (#36)
* add retry middleware

* cleanup

* cleanup

* cancel retries when parent context is cancelled

* cleanup

* handle remote timeouts

* add option for user supplied error retry test
2023-02-22 19:03:49 -08:00
David ColburnandGitHub 077a67f800 Fix client ignoring malformed request errors, clean up (#35)
* cleaning

* receive malformed_request errors, simplify nil subscription
2023-02-18 00:37:36 -08:00
David ColburnandGitHub 004a5b40ea fix panics (#34)
* fix panics

* must return ResponseType
2023-02-17 20:04:47 -08:00
Paul WellsandGitHub 61029f54d8 cleanup channel formatter (#33) 2023-02-16 17:29:40 -08:00
David ColburnandGitHub 6bb7f3bb23 don't respond if affinity < 0 (#32)
* don't respond if affinity < 1

* normal handler as well

* fix af
2023-02-16 16:08:04 -08:00
Paul WellsandGitHub 6373f05e04 fix sanitized prefix for utf16 (#31)
* fix sanitized prefix for utf16

* fix test
2023-02-16 14:50:26 -08:00
Paul WellsandGitHub a3148eb123 sanitize topics (#30)
* sanitize topics

* sanitized string test

* omit accented chars

* cleanup
2023-02-16 14:45:48 -08:00
Paul WellsandGitHub 7b011c0fb2 add typed topic args (#29)
* add typed topic args

* omit subscription rpcs from topic groups

* use reflection for registerer helper

* []string{} -> nil

* cleanup

* typo

* cleanup
2023-02-16 13:41:54 -08:00
Paul WellsandGitHub c56e769ac5 allow passing string k/v pairs to servers in contexts (#28)
* allow passing string k/v pairs to servers in contexts

* add dep

* message change

* multirpc
2023-02-15 18:37:53 -08:00
Paul WellsandGitHub 32a7c1df48 allow accessing stream context (#26) 2023-02-15 17:39:41 -08:00
Paul WellsandGitHub 367d365653 return correct errors from client after context cancel (#25) 2023-02-15 17:39:31 -08:00
Benjamin PrachtandGitHub 9564208411 Change ToGrpc signature to work automatically with GPRPC servers (#23)
With this change, returning a psrpc error in a grpc handler will allow the grpc machinery to interpret the error natively and set the response code appropriately.
2023-02-15 16:55:06 -08:00
Paul WellsandGitHub 77d24ba1dd add client interceptors (#21) 2023-02-15 16:41:49 -08:00
David ZhaoandGitHub 97a8a0ff14 Update to go-redis/v9 (#22) 2023-02-12 21:49:12 -08:00
Paul WellsandGitHub 1a2c16a544 continue to process messages for open streams while draining server (#19) 2023-02-01 17:08:02 -08:00
David ColburnandGitHub 4b94ae9614 bump version (#18) 2023-01-30 09:33:41 -08:00
Paul WellsandGitHub 6bc2cd54a3 remove error from StreamHandler.Recv (#17)
* remove error from receive interceptor

* simplify channel type
2023-01-28 12:14:24 -08:00
Paul WellsandGitHub f73a9777ea fix typo (#16) 2023-01-27 20:22:09 -08:00
Paul WellsandGitHub 5338837a3c add streaming rpc (#13)
* add streaming rpc

* fix active handler accounting

* add service test

* cleanup request context

* preserve stream order

* add stream interceptors

* add stream send options

* ensure stream is cleaned up after context cancel/open failure

* changes from feedback

* close stream with error on malformed message

* cleanup

* yield to service goroutine to fix flaky test

* add streaming client constructor

* update test client

* more docs
2023-01-27 10:42:15 -08:00