class xdk.streaming.StreamConfig
パラメータ
int
デフォルト:"10"
float
デフォルト:"1.0"
float
デフォルト:"64.0"
float
デフォルト:"2.0"
bool
デフォルト:"True"
float or None
デフォルト:"None"
int
デフォルト:"1024"
Callable[[], None] or None
デフォルト:"None"
Callable[[Exception or None], None] or None
デフォルト:"None"
Callable[[int, float], None] or None
デフォルト:"None"
Callable[[[StreamError
__init__
パラメータ
int
デフォルト:"10"
float
デフォルト:"1.0"
float
デフォルト:"64.0"
float
デフォルト:"2.0"
bool
デフォルト:"True"
float or None
デフォルト:"None"
int
デフォルト:"1024"
Callable[[], None] or None
デフォルト:"None"
Callable[[Exception or None], None] or None
デフォルト:"None"
Callable[[int, float], None] or None
デフォルト:"None"
Callable[[[StreamError
on_error : Callable[[[StreamError]
exception xdk.streaming.StreamError
パラメータ
str
StreamErrorType
__init__
パラメータ
str
StreamErrorType
class xdk.streaming.StreamErrorType
パラメータ
Any
class xdk.streaming.StreamState
パラメーター
int
デフォルト:"0"
float
デフォルト:"1.0"
bool
デフォルト:"False"
int
デフォルト:"0"
StreamError
__init__
パラメータ
int
デフォルト:"0"
float
デフォルト:"1.0"
bool
デフォルト:"False"
int
デフォルト:"0"
StreamError
last_error : [StreamError]
xdk.streaming.stream_with_retry
- 切断時の自動再接続
- リトライ待機時間に対するジッター付き指数バックオフ
- エラーを再試行可能なものと致命的なものに分類
- 接続状態を監視するためのライフサイクルコールバック
パラメーター
Session
HTTP 呼び出しに使用する requests の Session オブジェクト。
str
HTTP メソッド(通常は「get」)。
str
ストリーミング元となる完全な URL。
StreamConfig
リトライおよびコールバック設定を含む StreamConfig。