|
Couchbase Lite C++
Couchbase Lite C++ API
|
The configuration of a replicator. More...
#include <cbl++/Replicator.hh>
Public Member Functions | |
| ReplicatorConfiguration (std::vector< CollectionConfiguration >collections, Endpoint endpoint) | |
| Creates a config with a list of collections and per-collection configurations to replicate and an endpoint. | |
| std::vector< CollectionConfiguration > | collections () const |
| Returns the configured collections. | |
| Endpoint | endpoint () const |
| Returns the configured endpoint. | |
Public Attributes | |
| CBLReplicatorType | replicatorType = kCBLReplicatorTypePushAndPull |
| Replicator type : Push, pull or both. | |
| bool | continuous = false |
| Continuous replication or single-shot replication. | |
| bool | enableAutoPurge = true |
| Enabled auto-purge or not. | |
| unsigned | maxAttempts = 0 |
| Max retry attempts where the initial connect to replicate counts toward the given value. | |
| unsigned | maxAttemptWaitTime = 0 |
| Max wait time between retry attempts in seconds. | |
| unsigned | heartbeat = 0 |
| The heartbeat interval in seconds. | |
| Authenticator | authenticator |
| Authentication credentials, if needed. | |
| CBLProxySettings *_Nullable | proxy = nullptr |
| HTTP client proxy settings. | |
| fleece::MutableDict | headers = fleece::MutableDict::newDict() |
| Extra HTTP headers to add to the WebSocket request. | |
| bool | acceptParentDomainCookies = kCBLDefaultReplicatorAcceptParentCookies |
| 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. | |
| std::string | pinnedServerCertificate |
| An X.509 cert (PEM or DER) to "pin" for TLS connections. | |
| std::string | trustedRootCertificates |
| Set of anchor certs (PEM format). | |
| bool | acceptOnlySelfSignedServerCertificate = false |
| Accept only self-signed server certificates; any other certificates are rejected. | |
| PropertyEncryptor | documentPropertyEncryptor |
| Optional callback to encrypt encryptable properties during push replication. | |
| PropertyDecryptor | documentPropertyDecryptor |
| Optional callback to decrypt encrypted properties during pull replication. | |
Protected Member Functions | |
| operator CBLReplicatorConfiguration () const | |
| Base config without collections set. | |
Friends | |
| class | Replicator |
The configuration of a replicator.
|
inline |
Creates a config with a list of collections and per-collection configurations to replicate and an endpoint.
| collections | The collections and per-collection configurations. |
| endpoint | The endpoint to replicate with. |
|
inline |
Returns the configured collections.
|
inline |
Returns the configured endpoint.
|
inlineprotected |
Base config without collections set.
|
friend |
| bool cbl::ReplicatorConfiguration::acceptOnlySelfSignedServerCertificate = false |
Accept only self-signed server certificates; any other certificates are rejected.
(Enterprise Edition only.)
| bool cbl::ReplicatorConfiguration::acceptParentDomainCookies = kCBLDefaultReplicatorAcceptParentCookies |
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, which means that the parent-domain cookies are not permitted to save by default.
| Authenticator cbl::ReplicatorConfiguration::authenticator |
Authentication credentials, if needed.
| bool cbl::ReplicatorConfiguration::continuous = false |
Continuous replication or single-shot replication.
| PropertyDecryptor cbl::ReplicatorConfiguration::documentPropertyDecryptor |
Optional callback to decrypt encrypted properties during pull replication.
| PropertyEncryptor cbl::ReplicatorConfiguration::documentPropertyEncryptor |
Optional callback to encrypt encryptable properties during push replication.
| bool cbl::ReplicatorConfiguration::enableAutoPurge = true |
Enabled auto-purge or not.
If auto purge is enabled, then the replicator will automatically purge any documents that the replicating user loses access to via the Sync Function on Sync Gateway.
| fleece::MutableDict cbl::ReplicatorConfiguration::headers = fleece::MutableDict::newDict() |
Extra HTTP headers to add to the WebSocket request.
| unsigned cbl::ReplicatorConfiguration::heartbeat = 0 |
The heartbeat interval in seconds.
Specify 0 to use the default value of 300 seconds.
| unsigned cbl::ReplicatorConfiguration::maxAttempts = 0 |
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.
| unsigned cbl::ReplicatorConfiguration::maxAttemptWaitTime = 0 |
Max wait time between retry attempts in seconds.
Specify 0 to use the default value of 300 seconds.
| std::string cbl::ReplicatorConfiguration::pinnedServerCertificate |
An X.509 cert (PEM or DER) to "pin" for TLS connections.
The pinned cert will be evaluated against any certs in a cert chain, and the cert chain will be valid only if the cert chain contains the pinned cert.
| CBLProxySettings* _Nullable cbl::ReplicatorConfiguration::proxy = nullptr |
HTTP client proxy settings.
| CBLReplicatorType cbl::ReplicatorConfiguration::replicatorType = kCBLReplicatorTypePushAndPull |
Replicator type : Push, pull or both.
| std::string cbl::ReplicatorConfiguration::trustedRootCertificates |
Set of anchor certs (PEM format).