Couchbase Lite C
Couchbase Lite C API
Loading...
Searching...
No Matches
CBLReplicatorConfiguration Struct Reference

The configuration of a replicator. More...

#include <cbl/CBLReplicator.h>

Data Fields

CBLCollectionConfigurationcollections
 The collections to replicate with the target's endpoint (Required).
size_t collectionCount
 The number of collections (Required).
CBLEndpointendpoint
 The replication endpoint to replicate with (Required).
CBLReplicatorType replicatorType
 Push, pull or both.
bool continuous
 Continuous replication?
CBLAuthenticator *_cbl_nullable authenticator
 Authentication credentials, if needed.
void *_cbl_nullable context
 Arbitrary value that will be passed to callbacks.
FLSlice pinnedServerCertificate
 X.509 certificate (PEM or DER) to pin for TLS connections.
bool disableAutoPurge
 If auto purge is active, documents that the replicating user loses access to will be purged automatically.
unsigned maxAttempts
 Max retry attempts where the initial connect to replicate counts toward the given value.
unsigned maxAttemptWaitTime
 Max wait time between retry attempts in seconds.
unsigned heartbeat
 The heartbeat interval in seconds.
FLDict _cbl_nullable headers
 Extra HTTP headers to add to the WebSocket request.
const CBLProxySettings *_cbl_nullable proxy
 HTTP client proxy settings.
bool acceptParentDomainCookies
 The option to remove the restriction that does not allow the replicator to save the parent-domain cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP response.
FLSlice trustedRootCertificates
 Set of anchor certs (PEM format)
bool acceptOnlySelfSignedServerCertificate
 Accept only self-signed certificates; any other certificates are rejected.
CBLDocumentPropertyEncryptor _cbl_nullable documentPropertyEncryptor
 Callback to encrypt CBLEncryptable values.
CBLDocumentPropertyDecryptor _cbl_nullable documentPropertyDecryptor
 Callback to decrypt encrypted CBLEncryptable values.

Detailed Description

The configuration of a replicator.

Field Documentation

◆ acceptOnlySelfSignedServerCertificate

bool CBLReplicatorConfiguration::acceptOnlySelfSignedServerCertificate

Accept only self-signed certificates; any other certificates are rejected.

◆ acceptParentDomainCookies

bool CBLReplicatorConfiguration::acceptParentDomainCookies

The option to remove the restriction that does not allow the replicator to save the parent-domain cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP response.

For example, when the option is set to true, the cookies whose domain are “.foo.com” returned by “bar.foo.com” host will be permitted to save. This is only recommended if the host issuing the cookie is well trusted.

This option is disabled by default (see kCBLDefaultReplicatorAcceptParentCookies) which means that the parent-domain cookies are not permitted to save by default.

◆ authenticator

CBLAuthenticator* _cbl_nullable CBLReplicatorConfiguration::authenticator

Authentication credentials, if needed.

◆ collectionCount

size_t CBLReplicatorConfiguration::collectionCount

The number of collections (Required).

Must match the number of items in collections.

◆ collections

CBLCollectionConfiguration* CBLReplicatorConfiguration::collections

The collections to replicate with the target's endpoint (Required).

◆ context

void* _cbl_nullable CBLReplicatorConfiguration::context

Arbitrary value that will be passed to callbacks.

◆ continuous

bool CBLReplicatorConfiguration::continuous

Continuous replication?

. Default is kCBLDefaultReplicatorContinuous.

◆ disableAutoPurge

bool CBLReplicatorConfiguration::disableAutoPurge

If auto purge is active, documents that the replicating user loses access to will be purged automatically.

If disableAutoPurge is true, this behavior is disabled and an access removed event will be sent to document replication listeners if specified. Default is kCBLDefaultReplicatorDisableAutoPurge.

Note
Auto Purge is only applicable when replicating with Sync Gateway, and will not be performed when a documentIDs filter is specified.

◆ documentPropertyDecryptor

CBLDocumentPropertyDecryptor _cbl_nullable CBLReplicatorConfiguration::documentPropertyDecryptor

Callback to decrypt encrypted CBLEncryptable values.

◆ documentPropertyEncryptor

CBLDocumentPropertyEncryptor _cbl_nullable CBLReplicatorConfiguration::documentPropertyEncryptor

Callback to encrypt CBLEncryptable values.

◆ endpoint

CBLEndpoint* CBLReplicatorConfiguration::endpoint

The replication endpoint to replicate with (Required).

◆ headers

FLDict _cbl_nullable CBLReplicatorConfiguration::headers

Extra HTTP headers to add to the WebSocket request.

◆ heartbeat

unsigned CBLReplicatorConfiguration::heartbeat

The heartbeat interval in seconds.

Default is kCBLDefaultReplicatorHeartbeat.

◆ maxAttempts

unsigned CBLReplicatorConfiguration::maxAttempts

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

Default is kCBLDefaultReplicatorMaxAttemptsSingleShot for a one-shot replicator and kCBLDefaultReplicatorMaxAttemptsContinuous 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.

Default is kCBLDefaultReplicatorMaxAttemptsWaitTime.

◆ pinnedServerCertificate

FLSlice CBLReplicatorConfiguration::pinnedServerCertificate

X.509 certificate (PEM or DER) to pin for TLS connections.

The cert chain is valid only if it contains this cert.

◆ proxy

const CBLProxySettings* _cbl_nullable CBLReplicatorConfiguration::proxy

HTTP client proxy settings.

◆ replicatorType

CBLReplicatorType CBLReplicatorConfiguration::replicatorType

Push, pull or both.

Default is kCBLDefaultReplicatorType.

◆ trustedRootCertificates

FLSlice CBLReplicatorConfiguration::trustedRootCertificates

Set of anchor certs (PEM format)


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