Skip to content

Commit

Permalink
doc(kitex): update fallback.md en version (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangruiEmma authored Apr 18, 2024
1 parent 343c12d commit eee5ec8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Due to the involvement of business logic, Fallback is only supported through cod
### 2.1 Client-level configuration

```Go
import (
"github.com/cloudwego/kitex/client"
)

var opts []client.Option
opts = append(opts, client.WithFallback(yourFallbackPolicy))

Expand All @@ -42,6 +46,10 @@ xxxCli := xxxservice.NewClient("target_service", opts...)
### Call-level configuration

```Go
import (
"github.com/cloudwego/kitex/client/callopt"
)

xxxCli.XXXMethod(ctx, req, callopt.WithFallback(yourFallbackPolicy))
```

Expand Down

0 comments on commit eee5ec8

Please sign in to comment.