Skip to content

Commit

Permalink
Update suite.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GuangmingLuo authored Aug 31, 2021
1 parent b50d09e commit f87888c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/guide/extension/suite.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Suite Extensions - Encapsulating Custom Governance Modules
# Suite Extensions

## Encapsulating Custom Governance Modules

Suite is a high-level abstraction of extensions, a combination and encapsulation of Option and Middleware.

Expand Down Expand Up @@ -44,6 +46,6 @@ func (s2) Options() []client.Option {

Then if we use `client.WithSuite(s2{}), client.WithRPCTimeout(3*time.Second)`, it will execute `client.WithSuite(s1{})` first, followed by `client. WithRPCTimeout(1*time.Second)`, followed by `client.WithRPCTimeout(2*time.Second)`, and finally `client.WithRPCTimeout(3*time.Second)`. After this initialization, the value of RPCTimeout will be set to 3s (see the principle described at the beginning).

# Summary
## Summary

Suite is a higher-level combination and encapsulation, and it is recommended that third-party developers provide Kitex extensions based on Suite. Suite allows dynamically injecting values at creation time, or dynamically specifying values in its own middleware at runtime, making it easier for users and third-party developers to use and develop without relying on global variables, and making it possible to use different configurations for each client.

0 comments on commit f87888c

Please sign in to comment.