2017-10-27 06:01:09 +00:00
|
|
|
package rpc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type DiscoveryService struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type StartRequestParam struct {
|
|
|
|
Name string
|
|
|
|
Count int
|
|
|
|
}
|
|
|
|
|
|
|
|
type StartResponseParam struct {
|
|
|
|
Result int
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ds *DiscoveryService) Start(req *StartRequestParam, res *StartResponseParam) error {
|
|
|
|
log.Printf("DiscoveryService.Start param: Name[%s] Count[%d]", req.Name, req.Count)
|
|
|
|
|
2017-11-02 02:10:04 +00:00
|
|
|
res.Result = 10 + req.Count
|
2017-10-27 06:01:09 +00:00
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|