ais-service-discovery-go
ais-service-discovery-go copied to clipboard
Look into possible other solutions to the signature
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,
)