You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fallback values used when configs can't be loaded from the server. This is useful for resilience - your application can still function with sensible defaults if the Replane server is unavailable.
87
+
Default values used when configs can't be loaded from the server. This is useful for resilience - your application can still function with sensible defaults if the Replane server is unavailable.
84
88
85
89
```python
86
90
replane = Replane(
87
91
...,
88
-
fallbacks={
92
+
defaults={
89
93
"rate-limit": 100,
90
94
"feature-enabled": False,
91
95
"max-connections": 10,
92
96
},
93
97
)
94
98
```
95
99
96
-
Fallbacks are used in two scenarios:
100
+
Defaults are used in two scenarios:
101
+
97
102
1. During initialization if a config isn't returned by the server
98
103
2. If `get()` is called before initialization completes
99
104
100
105
#### `required`
106
+
101
107
-**Type:**`list[str]`
102
108
-**Default:**`[]`
103
109
@@ -114,6 +120,7 @@ replane = Replane(
114
120
This is useful for catching configuration errors early rather than at runtime.
115
121
116
122
#### `request_timeout_ms`
123
+
117
124
-**Type:**`int`
118
125
-**Default:**`2000` (2 seconds)
119
126
@@ -127,6 +134,7 @@ replane = Replane(
127
134
```
128
135
129
136
#### `initialization_timeout_ms`
137
+
130
138
-**Type:**`int`
131
139
-**Default:**`5000` (5 seconds)
132
140
@@ -142,6 +150,7 @@ replane = Replane(
142
150
If initialization times out, a `TimeoutError` is raised.
143
151
144
152
#### `retry_delay_ms`
153
+
145
154
-**Type:**`int`
146
155
-**Default:**`200` (0.2 seconds)
147
156
@@ -155,6 +164,7 @@ replane = Replane(
155
164
```
156
165
157
166
#### `inactivity_timeout_ms`
167
+
158
168
-**Type:**`int`
159
169
-**Default:**`30000` (30 seconds)
160
170
@@ -168,6 +178,7 @@ replane = Replane(
168
178
```
169
179
170
180
#### `debug`
181
+
171
182
-**Type:**`bool`
172
183
-**Default:**`False`
173
184
@@ -181,6 +192,7 @@ replane = Replane(
181
192
```
182
193
183
194
When enabled, you'll see logs for:
195
+
184
196
- Client initialization parameters
185
197
- SSE connection attempts and status
186
198
- Each config loaded from the server
@@ -190,6 +202,7 @@ When enabled, you'll see logs for:
0 commit comments