MultiSourcePolicy class
控制 source 初始化失败时是否自动尝试下一条优先级线路; 希望错误直接抛到 UI 时用 MultiSourcePolicy.manual。
- Annotations
Constructors
- MultiSourcePolicy.autoFailover({int maxAttempts})
-
默认策略:失败后自动尝试下一条线路,
maxAttempts为首次失败后 额外尝试的条数(默认 1)。constfactory - MultiSourcePolicy.manual()
-
关闭自动 failover;init 错误直接抛到 UI。
constfactory
Properties
- enabled → bool
-
是否启用自动 failover。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAttempts → int
-
首次失败后额外尝试的最大线路条数;manual 时恒为
0。final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited