mirror of
https://github.com/smallnest/rpcx.git
synced 2025-10-24 00:23:07 +08:00
20 lines
238 B
Go
20 lines
238 B
Go
package serverplugin
|
|
|
|
import "context"
|
|
|
|
type Args struct {
|
|
A int
|
|
B int
|
|
}
|
|
|
|
type Reply struct {
|
|
C int
|
|
}
|
|
|
|
type Arith int
|
|
|
|
func (t *Arith) Mul(ctx context.Context, args *Args, reply *Reply) error {
|
|
reply.C = args.A * args.B
|
|
return nil
|
|
}
|