File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1010import io .grpc .Status ;
1111import io .grpc .StatusRuntimeException ;
1212import java .util .Iterator ;
13+ import java .util .List ;
14+ import java .util .Map ;
1315
1416// Installation
1517// https://search.maven.org/artifact/com.authzed.api/authzed
@@ -33,6 +35,26 @@ public static void main(String[] args) {
3335 ManagedChannel channel = ManagedChannelBuilder
3436 .forTarget (target )
3537 .useTransportSecurity () // if not using TLS, replace with .usePlaintext()
38+ .disableServiceConfigLookUp ()
39+ .defaultServiceConfig (Map .of (
40+ "methodConfig" , List .of (
41+ Map .of (
42+ "name" , List .of (
43+ Map .of (
44+ "service" , "authzed.api.v1.WatchService" ,
45+ "method" , "Watch"
46+ )
47+ ),
48+ "retryPolicy" , Map .of (
49+ "maxAttempts" , "5" ,
50+ "initialBackoff" , "1s" ,
51+ "backoffMultiplier" , "4.0" ,
52+ "maxBackoff" , "30s" ,
53+ "retryableStatusCodes" , List .of ("UNAVAILABLE" , "INTERNAL" )
54+ )
55+ )
56+ )
57+ ))
3658 .build ();
3759
3860 ZedToken lastZedToken = ZedToken .newBuilder ().setToken ("" ).build ();
You can’t perform that action at this time.
0 commit comments