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

[EXPERIMENTAL] Service framework #1111

Merged
merged 6 commits into from Oct 27, 2022
Merged

[EXPERIMENTAL] Service framework #1111

merged 6 commits into from Oct 27, 2022

Conversation

aricart
Copy link
Member

@aricart aricart commented Oct 19, 2022

This is just a wip for the go version - need to do another pass
The javascript one can be found here nats-io/nats.deno#383

derekcollison and others added 2 commits September 15, 2022 17:57
Signed-off-by: Derek Collison <derek@nats.io>
@coveralls
Copy link

coveralls commented Oct 19, 2022

Coverage Status

Coverage increased (+0.04%) to 85.773% when pulling a49531e on alberto-services into ffbe2f9 on main.

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM - Minor question

service.go Outdated
info := fmt.Sprintf("%s.INFO", subject)
svc.infoSub, err = nc.QueueSubscribe(info, QG, func(m *Msg) {
si := &ServiceInfo{
Name: svc.name,
Copy link
Member

Choose a reason for hiding this comment

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

Should we have the subject you can send requests to here?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is part of the configuration for the service - part of the Endpoint struct - the reason for the indirection is that if when we support JetStream this will be a different kind of Endpoint.

Copy link
Member

Choose a reason for hiding this comment

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

But I think an info request from a NATS cli or random app should get the subject back from this call as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! - that we can easily do that.

Copy link
Member Author

@aricart aricart Oct 20, 2022

Choose a reason for hiding this comment

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

Fixed!

service.go Outdated
Id string `json:"id"`
Description string `json:"description"`
Version string `json:"version"`
Subject string `json:"subject"`
Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

@derekcollison
Copy link
Member

derekcollison commented Oct 20, 2022 via email

@piotrpio piotrpio force-pushed the alberto-services branch 5 times, most recently from 73b1a1f to 8f9a687 Compare October 27, 2022 16:18
@piotrpio piotrpio changed the title Alberto services [EXPERIMENTAL] Service framework Oct 27, 2022
@piotrpio piotrpio marked this pull request as ready for review October 27, 2022 19:10
@piotrpio piotrpio merged commit 11293d3 into main Oct 27, 2022
@piotrpio piotrpio deleted the alberto-services branch October 27, 2022 19:15
@piotrpio piotrpio mentioned this pull request Oct 27, 2022
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.

None yet

4 participants