Skip to content

Commit 9a2359c

Browse files
Merge pull request matteobortolazzo#173 from nefarius/master
Added missing replication methods to client interface
2 parents 5d403f7 + 72296c9 commit 9a2359c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/CouchDB.Driver/ICouchClient.cs

+24
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,30 @@ Task<ICouchDatabase<TSource>> GetOrCreateDatabaseAsync<TSource>(int? shards = nu
164164
/// <returns>A task that represents the asynchronous operation. The task result contains the sequence of all active tasks.</returns>
165165
Task<IEnumerable<CouchActiveTask>> GetActiveTasksAsync(CancellationToken cancellationToken = default);
166166

167+
/// <summary>
168+
/// Configures a database replication operation.
169+
/// </summary>
170+
/// <param name="source">Fully qualified source database URL or an object which contains the full URL of the source database with additional parameters like headers.</param>
171+
/// <param name="target">Fully qualified target database URL or an object which contains the full URL of the target database with additional parameters like headers.</param>
172+
/// <param name="replication">An instance of <see cref="CouchReplication"/>.</param>
173+
/// <param name="persistent">Persist the operation to the replication database.</param>
174+
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
175+
/// <returns>Returns True if the operation succeeded, False otherwise.</returns>
176+
Task<bool> ReplicateAsync(string source, string target, CouchReplication? replication = null,
177+
bool persistent = true, CancellationToken cancellationToken = default);
178+
179+
/// <summary>
180+
/// Removes a database replication operation.
181+
/// </summary>
182+
/// <param name="source">Fully qualified source database URL or an object which contains the full URL of the source database with additional parameters like headers.</param>
183+
/// <param name="target">Fully qualified target database URL or an object which contains the full URL of the target database with additional parameters like headers.</param>
184+
/// <param name="replication">An instance of <see cref="CouchReplication"/>.</param>
185+
/// <param name="persistent"></param>
186+
/// <param name="cancellationToken">A <see cref="CancellationToken" /> to observe while waiting for the task to complete.</param>
187+
/// <returns>Returns True if the operation succeeded, False otherwise.</returns>
188+
Task<bool> RemoveReplicationAsync(string source, string target, CouchReplication? replication = null,
189+
bool persistent = true, CancellationToken cancellationToken = default);
190+
167191
/// <summary>
168192
/// Get the database name for the given type.
169193
/// </summary>

0 commit comments

Comments
 (0)