Commit Graph

36 Commits

Author SHA1 Message Date
Derek Collison
090c71e95c Assign jsSub during low level subscription
Signed-off-by: Derek Collison <derek@nats.io>
2020-12-03 16:09:52 -08:00
Aymerick Valette
944aa4df1c Make handler documentation more generalized 2020-08-28 12:38:12 +02:00
Derek Collison
6512038e73 Added generic header support
This is meant to mirror HTTP headers as much as possible for interop not only between our clients but HTTP clients in general. I actually used the http.Header directly, so we get canonical names, etc.

I thought about adding in a way to add the data field to a message such that you could detect mime-type and content-length etc. But Go's builtin type detection is not that good, so stuck with basics.

Signed-off-by: Derek Collison <derek@nats.io>
2020-05-26 05:13:55 -07:00
Derek Collison
6de9666b04 encoded test updates
Signed-off-by: Derek Collison <derek@nats.io>
2019-07-09 08:33:01 -07:00
Derek Collison
1b389910f6 Fix some comments [ci skip]
Signed-off-by: Derek Collison <derek@nats.io>
2019-07-09 08:32:53 -07:00
Derek Collison
234e9d8119 Updates for rename and go.mod support
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-10 13:24:55 -07:00
Derek Collison
df59787a1a Changed approach to always set type in low level subscribe
Signed-off-by: Derek Collison <derek@nats.io>
2019-03-14 13:13:48 -07:00
Ivan Kozlovic
e1ecdaf8d4 Replace megacheck with staticcheck
Megacheck has been deprecated.
Dropping Go 1.9 from build matrix since staticcheck does not work
with that and Go 1.9 is technically no longer supported.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-08 11:20:56 -07:00
Derek Collison
9df6a3f9a4 Encoded Conns support Drain 2018-08-13 16:17:46 -07:00
Ivan Kozlovic
f9649c3633 [FIXED] Dispatching of asynchronous callbacks
This is a follow up on #365. Working on another issue and running
tests, I still had a race on the original ach or a panic on send
to close channel.

Move from a channel to a linked list with dedicated lock.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-06-11 18:51:55 -06:00
Derek Collison
2f0e8883ae CNCF, move to Apache 2 2018-03-17 13:36:48 -07:00
Ivan Kozlovic
7fb0d8ee11 Fixed misspell invocation and some misspelled words 2017-04-21 10:12:30 -06:00
Derek Collison
c1c9ec3f56 Rename of repo to go-nats 2016-11-20 11:50:22 -08:00
Ivan Kozlovic
e66adf0068 Fix some encoders issues.
- Return error when Handler has no argument (would cause nil pointer
  panic)
- Schedule async error callbacks when possible
- Add more tests and increase test coverage
2016-01-27 18:37:04 -07:00
Derek Collison
6a83f1a633 Merge pull request #131 from AnatoliiPrylutskyi/pub_sub_global_error
Fix error in next message after encode/decode fail in previous
2016-01-20 12:54:03 -07:00
Derek Collison
66e9c074f2 Pending cleanup, added Subscription types 2016-01-19 18:33:46 -07:00
anatolii.prylutskyi
8f11dc38b6 Remove global errors form publish and subscribe methods, all tests passed 2016-01-19 21:22:04 +02:00
Derek Collison
43c8fecf5e Remove channels for async subscribers, better slow consumer, etc 2016-01-17 17:05:00 -08:00
Derek Collison
9e99c311db lint fixups 2016-01-16 10:44:11 -08:00
Derek Collison
abd172f2ff Fix for #48 2015-09-17 20:02:51 -07:00
Derek Collison
6ad8596974 Moved encoders into sub-directory, added server spinup 2015-09-13 08:21:46 -07:00
Derek Collison
d90c4a3c63 Allow programmable channel sizes for subscribers, #46, #47 2015-01-31 16:55:44 -08:00
Derek Collison
bfee3dd67a Added ConnectedServerId, minor cleanups 2014-11-28 10:15:05 -08:00
Derek Collison
2c4744bbea fixed race, bumped version 2014-09-10 16:31:35 -07:00
Damian Gryski
b0e7eae926 use fmt.Errorf() instead of errors.New(fmt.Sprintf()) 2013-10-19 20:46:14 +02:00
Derek Collison
99a2b6221a Added in gob Encoder 2013-06-21 17:24:06 -07:00
Derek Collison
e8a0320895 Updated copyright 2013-06-12 00:19:48 -07:00
Derek Collison
775f8a0170 Fixed vet tests for go1.1 2013-06-11 22:01:46 -07:00
Brady Catherman
6fcf9fafa4 Expose isClosed to clients. 2013-02-05 13:50:32 -08:00
Mark Veronda
3741a705c4 Fixed type-os and standardized some comments 2012-12-04 16:31:11 -08:00
Derek Collison
c6a8587947 Renamed async callback 2012-10-08 11:06:09 -07:00
Derek Collison
a0abbbe624 First pass async err handler 2012-10-08 10:33:33 -07:00
Derek Collison
b239068e32 Added Raw Msg support to EncodedConn.Request() 2012-10-05 10:30:00 -07:00
Derek Collison
d5c3b60b65 Added Request functionality 2012-10-05 07:39:56 -07:00
Derek Collison
4168d79c16 Added reconnect logic and better state management 2012-10-04 12:37:36 -07:00
Derek Collison
92af31071c EncodedConn functionality added.
EncodedConn will be the preferred way to interface with the NATS Go client.
It provides a simplified API that uses interface{} to allow for sending
and receiving Go types. It has registered Encoders that can be extended
that are responsible for marshalling data to and from the wire.
2012-10-03 10:47:50 -07:00