RetryStrategy.create constructor
RetryStrategy.create({
- required AgentSegment segment,
- required String appId,
- required String apiKey,
- required Iterable<
Host> defaultHosts(), - ClientOptions options = const ClientOptions(),
Creates RetryStrategy, defaults to DioRequester
.
Implementation
RetryStrategy.create({
required AgentSegment segment,
required String appId,
required String apiKey,
required Iterable<Host> Function() defaultHosts,
ClientOptions options = const ClientOptions(),
}) : this(
readTimeout: options.readTimeout,
writeTimeout: options.writeTimeout,
hosts: options.hosts ?? defaultHosts.call(),
requester: options.requester ??
DioRequester(
appId: appId,
apiKey: apiKey,
headers: options.headers,
connectTimeout: options.connectTimeout,
clientSegments: [segment, ...?options.agentSegments],
logger: options.logger,
interceptors: options.interceptors,
httpClientAdapter: options.httpClientAdapter,
),
);