Hi all,
I am looking for a good example of calling a remote server (from another server) as a client.
* using consul discovery
* load- balance
* circuit-breaker
* rate limiting
the example I found seemed to be over complicated making Endpoints and then wrapping them in a factory:
var remote participant.RemoteEndpoints
{
instancer := consul.NewInstancer(client, logger, consulService, consulTags, passingOnly)
factory := factoryFor(participant.MakeRemoteEndpoint)
endpointer := sd.NewEndpointer(instancer, factory, logger)
balancer := lb.NewRoundRobin(endpointer)
retry := lb.Retry(retryMax, retryTimeout, balancer)
remote.Test = retry
}
is there an example that is not using endpoints?
why using endpoints is so complex?
Thanks.