Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHANGED] More verbose endpoint INFO #663

Merged
merged 4 commits into from
Jun 13, 2023
Merged

Conversation

levb
Copy link
Collaborator

@levb levb commented Jun 11, 2023

@levb levb mentioned this pull request Jun 11, 2023
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@levb levb merged commit eaa4925 into lev-microservice-proto Jun 13, 2023
@levb levb deleted the lev-micro-metadata branch June 13, 2023 13:22
levb added a commit that referenced this pull request Jun 14, 2023
* WIP: A skeleton microservice object

* Responds to a PING

* Clarified - this is NOT a JS thing!

* Renamed the example microservice

* First implementation of the default endpoint

* Sequence calculator service - a working example of multiple endpoints.

* Added support for info, stats, natsError

* refactored with the 'micro' prefix

* fixed includes

* wip custom error handler

* simplified examples

* Fixed leaks, debugged the tests

* Groups

* "Basic" test.

* more tests from go, fixes

* Docs (sans HTML) and some PR feedback (names)

* request handler returns err instead of calling Respond(Error)

* Reworked how endpoints are stores in servbice, refcounting

* fixed copyright messages

* PR feedback: fixes in examples

* PR feedback: removed redundant include mem.h

* PR Feedback: use `size_t` and `natsSubscription_GetSubject`

* PR feedback: initialize decoded_len

* PR feedback: removed err->message silliness

* PR feedback: cast size_t to int calling natsMsg_Create

* Ref counting fixes

* PR feedback: strdup-ed strings in Info and Stats

* Fixed NULL pointer crashes in the previous commit

* PR feedback: micro_new_endpoint: check if endpoint config is NULL

* PR feedback: missing unlocks

* PR feedback: use natsBuf_AppendByte where appropriate

* PR feedback: CamelCased remaining public fields

* Added support for multiple handlers for ConnectionClosed and AsyncError callback events.

Added a nats_CallbackList internal type, use it for closed and error cases.
Removed prior code for natsConn_get/setXXXCallback.
Cleaned up access to other callbacks in conn.c (lock opts).

* added is_internal to microError to avoid freeing internal values

* PR feedback: initialize  to avoid a warning

* Removed the never-implemented schema

* PR feedback: added a missing FREE(replaced)

* PR feedback: free the replaced value in SetErrorHandler and SetClosedCB

* reversed: previous (free the replaced value...), added a test

* PR feedback: whitespace

* PR feedback: nit - added natsOptions_(un)lock

* PR feedback: hopefully fixes all windows warnings

* PR feedback: hopefully fixes all windows warnings

* PR feedback: removed previous PR, wrong branch

* restored LOCK_OPTIONS macros

* `Done` handler

* printf

* Added Test_MicroAsyncErrorHandler

* PR feedback: warnings

* Fixed AsyncErr test

* Now with a Done handler to fix the test on gcc builds

* try-1

correct fix?

wip

minimized list.txt

minimized list.txt

minimized list.txt

wip

wip more

wip more+

wip more+oops

wip more+oops+printf

* wip

* wip

* wip2

* wip3

* wip4

* wip5

* reworked wip

* reworked wip2

* reworked wip3

* reworked wip4

* reworked wip5

* reworked wip5

* reworked wip6

* reworked wip7

* reworked wip8

* reworked wip9

* reworked wip10

* reworked wip11

* reworked wip12

* reworked wip13

* reworked wip14

* reworked wip15

* wip nits

* wip more nits

* Moving global variables inside natsLib for proper cleanup on close

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>

* PR feedback sans global elimination

* Restored num_services=5 in tests

* PR feedback: microError.message

* PR feedback: nats_vsnprintf

* PR feedback: nats_vsnprintf, #2

* [CHANGED] More verbose endpoint INFO (#663)

* More verbose endpoint INFO

* better clone/free for metadata

* (valgrind) free test JSON array

* PR feedback: unsed var

* Fix to run on Windows

The change that I asked to make earlier regarding nats_vsnprint
in some places was wrong, but more importantly, you can't pass
a NULL buffer on Windows in order to calculate the length of
the formatted string. Instead, I added a new macro that uses
a different function for Windows.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>

---------

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Co-authored-by: Lev Brouk <levbrouk@levs-mbp-2.lan>
Co-authored-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants