package battle import ( "go_dreamfactory/lego/sys/log" "google.golang.org/protobuf/proto" ) //异步返回结构 type MessageCall struct { Method string Metadata map[string]string ResMetadata map[string]string Args proto.Message //请求参数 Reply proto.Message //返回参数 Error error //错误信息 Done chan *MessageCall } func (call *MessageCall) done(log log.Ilogf) { select { case call.Done <- call: // ok default: log.Debugf("rpc: discarding Call reply due to insufficient Done chan capacity") } }