ReplicatorConfiguration

public class ReplicatorConfiguration

Replicator configuration.

  • The local database to replicate with the replication target.

    Declaration

    Swift

    public let database: Database
  • The replication target to replicate with.

    Declaration

    Swift

    public let target: Endpoint
  • Replicator type indicating the direction of the replicator.

    Declaration

    Swift

    public var replicatorType: ReplicatorType = .pushAndPull
  • The continuous flag indicating whether the replicator should stay active indefinitely to replicate changed documents.

    Declaration

    Swift

    public var continuous: Bool = false
  • The conflict resolver for this replicator.

    Declaration

    Swift

    public var conflictResolver: ConflictResolver = DefaultConflictResolver()
  • The Authenticator to authenticate with a remote target.

    Declaration

    Swift

    public var authenticator: Authenticator?
  • The remote target’s SSL certificate.

    Declaration

    Swift

    public var pinnedServerCertificate: SecCertificate?
  • Extra HTTP headers to send in all requests to the remote target.

    Declaration

    Swift

    public var headers: Dictionary<String, String>?
  • A set of Sync Gateway channel names to pull from. Ignored for push replication. If unset, all accessible channels will be pulled. Note: channels that are not accessible to the user will be ignored by Sync Gateway.

    Declaration

    Swift

    public var channels: [String]?
  • A set of document IDs to filter by: if given, only documents with these IDs will be pushed and/or pulled.

    Declaration

    Swift

    public var documentIDs: [String]?
  • Initializes a ReplicatorConfiguration’s builder with the given local database and the replication target.

    Declaration

    Swift

    public init(database: Database, target: Endpoint)

    Parameters

    database

    The local database.

    target

    The replication target.

  • Initializes a ReplicatorConfiguration’s builder with the given configuration object.

    Declaration

    Swift

    public convenience init(config: ReplicatorConfiguration)

    Parameters

    config

    The configuration object.