feat: implement server and client
This commit is contained in:
12
example/service.go
Normal file
12
example/service.go
Normal file
@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
type Foo int
|
||||
|
||||
type Args struct {
|
||||
Num1, Num2 int
|
||||
}
|
||||
|
||||
func (f Foo) Sum(args Args, reply *int) error {
|
||||
*reply = args.Num1 + args.Num2
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user