1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 12:32:21 +00:00

Merge pull request #219 from fuwensun/pr4-3-1a

fixed typos
This commit is contained in:
chai2010 2018-08-01 17:50:31 +08:00 committed by GitHub
commit cec1bae073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ func (call *Call) done() {
}
```
`Call.done`方法的实现可以得知`call.Done`管道会将处理后的call返回。
`Call.done`方法的实现可以得知`call.Done`管道会将处理后的call返回。
## 基于RPC实现Watch功能
@ -151,7 +151,7 @@ func (p *KVStoreService) Watch(timeoutSecond int, keyChanged *string) error {
Watch方法的输入参数是超时的秒数。当有key变化时将key作为返回值返回。如果超过时间后依然没有key被修改则返回超时的错误。Watch的实现中用唯一的id表示每个Watch调用然后根据id将自身对应的过滤器函数注册到`p.filter`列表。
KVStoreService服务注册和启动过程我们不再赘述。下面我们看看如何从客户端使用Watch方法
KVStoreService服务注册和启动过程我们不再赘述。下面我们看看如何从客户端使用Watch方法
```go
func doClientWork(client *rpc.Client) {