Skip to content

Commit

Permalink
Update doc (#85)
Browse files Browse the repository at this point in the history
* update api.md

* update readme

Co-authored-by: dayong <[email protected]>
  • Loading branch information
wangdayong228 and dayong authored Jun 11, 2021
1 parent b047257 commit bb43ea8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ func main() {

Client applies method `UseCallRpcMiddleware` to set middleware for hooking `callRpc` method which is the core of all single rpc related methods. And `UseBatchCallRpcMiddleware` to set middleware for hooking `batchCallRPC`.

For example, use `CallRpcLogMiddleware` to log for rpc requests.
For example, use `CallRpcConsoleMiddleware` to log for rpc requests.
```golang
client.UseCallRpcMiddleware(middleware.CallRpcLogMiddleware)
client.UseCallRpcMiddleware(middleware.CallRpcConsoleMiddleware)
```

Also you could
Expand Down
8 changes: 4 additions & 4 deletions example/context/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ func initClient() {

// init retry client
option := sdk.ClientOption{
KeystorePath: keyStorePath,
RetryCount: 10,
RetryInterval: time.Second,
RequestTimeout: time.Second * 10,
KeystorePath: keyStorePath,
RetryCount: 10,
RetryInterval: time.Second,
// RequestTimeout: time.Second * 10,
}
retryclient, err := sdk.NewClient(config.NodeURL, option)
if err != nil {
Expand Down

0 comments on commit bb43ea8

Please sign in to comment.