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>
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>
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>
- 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
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.