4 ms·
> trying to hide distribution The paper unfortunately hides that in reality you have to pass a context object in your RPC calls, hence there is no ambiguity wh
by dti 3y ago
> trying to hide distribution
The paper unfortunately hides that in reality you have to pass a context object in your RPC calls, hence there is no ambiguity whether you are calling a potentially remote object.
It's in the example on the project home page: https://serviceweaver.dev/ https://serviceweaver.dev/
// The "RPC" handler
func (adder) Add(_ context.Context, x, y int) (int, error) {
return x + y, nil
}
// The call-site
var adder Adder = ... // See documentation
sum, err := adder.Add(ctx, 1, 2)