Couchbase Lite C
Couchbase Lite C API
Data Fields
CBLReplicatorConfiguration Struct Reference

The configuration of a replicator. More...

#include <cbl/CBLReplicator.h>

Data Fields

CBLDatabasedatabase
 The database to replicate. More...
 
CBLEndpointendpoint
 The address of the other database to replicate with. More...
 
CBLReplicatorType replicatorType
 Push, pull or both. More...
 
bool continuous
 Continuous replication? More...
 
bool disableAutoPurge
 If auto purge is active, then the library will automatically purge any documents that the replicating user loses access to via the Sync Function on Sync Gateway. More...
 
unsigned maxAttempts
 Max retry attempts where the initial connect to replicate counts toward the given value. More...
 
unsigned maxAttemptWaitTime
 Max wait time between retry attempts in seconds. Specify 0 to use the default value of 300 seconds. More...
 
unsigned heartbeat
 The heartbeat interval in seconds. Specify 0 to use the default value of 300 seconds. More...
 
CBLAuthenticator *_cbl_nullable authenticator
 Authentication credentials, if needed. More...
 
const CBLProxySettings *_cbl_nullable proxy
 HTTP client proxy settings. More...
 
FLDict _cbl_nullable headers
 Extra HTTP headers to add to the WebSocket request. More...
 
FLSlice pinnedServerCertificate
 An X.509 cert to "pin" TLS connections to (PEM or DER) More...
 
FLSlice trustedRootCertificates
 Set of anchor certs (PEM format) More...
 
FLArray _cbl_nullable channels
 Optional set of channels to pull from. More...
 
FLArray _cbl_nullable documentIDs
 Optional set of document IDs to replicate. More...
 
CBLReplicationFilter _cbl_nullable pushFilter
 Optional callback to filter which docs are pushed. More...
 
CBLReplicationFilter _cbl_nullable pullFilter
 Optional callback to validate incoming docs. More...
 
CBLConflictResolver _cbl_nullable conflictResolver
 Optional conflict-resolver callback. More...
 
void *_cbl_nullable context
 Arbitrary value that will be passed to callbacks. More...
 
CBLPropertyEncryptor propertyEncryptor
 Optional callback to encrypt CBLEncryptable values. More...
 
CBLPropertyDecryptor propertyDecryptor
 Optional callback to decrypt encrypted CBLEncryptable values. More...
 

Detailed Description

The configuration of a replicator.

Field Documentation

◆ authenticator

CBLAuthenticator* _cbl_nullable CBLReplicatorConfiguration::authenticator

Authentication credentials, if needed.

◆ channels

FLArray _cbl_nullable CBLReplicatorConfiguration::channels

Optional set of channels to pull from.

◆ conflictResolver

CBLConflictResolver _cbl_nullable CBLReplicatorConfiguration::conflictResolver

Optional conflict-resolver callback.

◆ context

void* _cbl_nullable CBLReplicatorConfiguration::context

Arbitrary value that will be passed to callbacks.

◆ continuous

bool CBLReplicatorConfiguration::continuous

Continuous replication?

◆ database

CBLDatabase* CBLReplicatorConfiguration::database

The database to replicate.

◆ disableAutoPurge

bool CBLReplicatorConfiguration::disableAutoPurge

If auto purge is active, then the library will automatically purge any documents that the replicating user loses access to via the Sync Function on Sync Gateway.

If disableAutoPurge is true, this behavior is disabled and an access removed event will be sent to any document listeners that are active on the replicator.

IMPORTANT: For performance reasons, the document listeners must be added before the replicator is started or they will not receive the events.

◆ documentIDs

FLArray _cbl_nullable CBLReplicatorConfiguration::documentIDs

Optional set of document IDs to replicate.

◆ endpoint

CBLEndpoint* CBLReplicatorConfiguration::endpoint

The address of the other database to replicate with.

◆ headers

FLDict _cbl_nullable CBLReplicatorConfiguration::headers

Extra HTTP headers to add to the WebSocket request.

◆ heartbeat

unsigned CBLReplicatorConfiguration::heartbeat

The heartbeat interval in seconds. Specify 0 to use the default value of 300 seconds.

◆ maxAttempts

unsigned CBLReplicatorConfiguration::maxAttempts

Max retry attempts where the initial connect to replicate counts toward the given value.

Specify 0 to use the default value, 10 times for a non-continuous replicator and max-int time for a continuous replicator. Specify 1 means there will be no retry after the first attempt.

◆ maxAttemptWaitTime

unsigned CBLReplicatorConfiguration::maxAttemptWaitTime

Max wait time between retry attempts in seconds. Specify 0 to use the default value of 300 seconds.

◆ pinnedServerCertificate

FLSlice CBLReplicatorConfiguration::pinnedServerCertificate

An X.509 cert to "pin" TLS connections to (PEM or DER)

◆ propertyDecryptor

CBLPropertyDecryptor CBLReplicatorConfiguration::propertyDecryptor

Optional callback to decrypt encrypted CBLEncryptable values.

◆ propertyEncryptor

CBLPropertyEncryptor CBLReplicatorConfiguration::propertyEncryptor

Optional callback to encrypt CBLEncryptable values.

◆ proxy

const CBLProxySettings* _cbl_nullable CBLReplicatorConfiguration::proxy

HTTP client proxy settings.

◆ pullFilter

CBLReplicationFilter _cbl_nullable CBLReplicatorConfiguration::pullFilter

Optional callback to validate incoming docs.

◆ pushFilter

CBLReplicationFilter _cbl_nullable CBLReplicatorConfiguration::pushFilter

Optional callback to filter which docs are pushed.

◆ replicatorType

CBLReplicatorType CBLReplicatorConfiguration::replicatorType

Push, pull or both.

◆ trustedRootCertificates

FLSlice CBLReplicatorConfiguration::trustedRootCertificates

Set of anchor certs (PEM format)


The documentation for this struct was generated from the following file: