RetryStrategy.create constructor

RetryStrategy.create({
  1. required AgentSegment segment,
  2. required String appId,
  3. required String apiKey,
  4. required Iterable<Host> defaultHosts(),
  5. 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,
            ),
      );