This also introduces the ability to have flow control inbound for restoring a stream.
If the system detects a reply subject it will respond with a nil payload.
For the last EOF message if a reply is present it will respond with a stream info response or error.
Signed-off-by: Derek Collison <derek@nats.io>
We now publish advisories when streams and consumers are added,
deleted and modified
Also rework how TypedEvents are created to be easier to use
Signed-off-by: R.I.Pienaar <rip@devco.net>
when go json marshal a unset []string it puts
null in the body and not [] which then makes
it an invalid list of strings.
Signed-off-by: R.I.Pienaar <rip@devco.net>
Also standardise some names of response structures and create
reusable types that can be included into others to construct
our standard API requests and responses.
Fixes some json tags.
Updates the design document of the JSON responses to reflect
the implementation that was done
Signed-off-by: R.I.Pienaar <rip@devco.net>
API still only turned on for account info in disabled accounts. Issues with advisories. Plan is still to have all endpoints on in all accounts.
Stream list and Consumer list return names only, page limit increased to 1024.
Stream, Consumer and Template names limited to 256 for now.
Subject API for stream messages, delete and get, not have STREAM.MSG.
Subject API for Durable is now CONSUMER.DURABLE.
Subject API for Templates now STREAM.TEMPLATE.
All subject APIs for list reverted back, so STREAM.LIST, CONSUMER.LIST etc.
Signed-off-by: Derek Collison <derek@nats.io>
API made more consistent. Noun followed by verb.
Name arguments in request subejcts are always at the end now.
Remove enabled call, just use account info.
Getting a message directly from a stream is treated like an admin API and requires JSON request.
Deleting a message directly as well.
StreamList and ConsumerList now include details and support paging.
Streams and Consumers now contain a created field in their info.
Signed-off-by: Derek Collison <derek@nats.io>
Removed usage of +OK and -ERR. All responses are valid json objects now and optionally can include an ApiError which will have Code and Description.
Signed-off-by: Derek Collison <derek@nats.io>
Use the same key name for time in all events
Use the same format in all events
RFC3339 is the standard for this stuff and
for sure it should all be in UTC rather than
local time