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

Look into possible other solutions to the signature #2

Open
EwanValentine opened this issue Oct 28, 2019 · 0 comments
Open

Look into possible other solutions to the signature #2

EwanValentine opened this issue Oct 28, 2019 · 0 comments

Comments

@EwanValentine
Copy link
Contributor

A few users have suggested the namespace.service->instance signature type, isn't very 'Go'. This was ported over from a Javascript library (the wild west), so I maybe need to investigate a more Go friendly approach.

Possibly:

d := discover.NewDiscovery(
  discover.SetNamespace("default"),
)

srv := d.SetService("my-service")
res := srv.Request("instance")
...
res := srv.RequestWithOpts("instance", opts)

Or:

res := d.Request(&discover.Addr{
  Namespace: "default",
  Service: "my-service",
  Instance: "my-func"},
  req,
)
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

No branches or pull requests

1 participant