-
Notifications
You must be signed in to change notification settings - Fork 189
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
Document go-basic go-micro interfaces #1749
Comments
@butonic thanks a lot for this!
The nodes should have these options, right? And the service would have a 1-many relationship with the nodes. |
There are two sides to the service registry: A In the So, Servers are not really aware of other Nodes. They could look them up using the registry if they wanted to, though. |
This is great work, thanks for it. I would love to have an addition that explains the used terms |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions. |
Outdated. Closing. |
The basic interfaces that describe how clients and servers interact in go-micro are:
Service
,Server
,Client
,Registry
andSelector
:When you want to make a call to a
Server
you would instantiate aService
by name and then callClient()
on it. When making aCall()
theClient
then uses theSelector
sNext()
to look up the actualNode
in theRegistry
. It contains the address and port to which the request should actually be made.When starting a
Server
you would instantiate aService
by name and then callServer()
on it. This will initialize the Server with aRegistry
that is used to register theService
whenStart()
ing it. The Service also has anAddress
and anAdvertise
option. When ´Advertise´ is present it will be used as the Address that is registered in the registry, allowing the service lo listen onAddress=0.0.0.0:1234
while registeringAdvertise=1.2.3.4:1234
as the Address in the registry. This solves the problem of differentiating between the listen address and the host:port other services should connect to.The go-micro interface cover way more aspects of a microservice architecture, eg.
Broker
,Publisher
,Subscribe
or more fine granular things likeCodecs
andTransports
.The text was updated successfully, but these errors were encountered: