Initial import of the CBDDC codebase with docs and tests. Add a .NET-focused gitignore to keep generated artifacts out of source control.
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
Joseph Doherty
2026-02-20 13:03:21 -05:00
commit 08bfc17218
218 changed files with 33910 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using ZB.MOM.WW.CBDDC.Core.Network;
namespace ZB.MOM.WW.CBDDC.Core.Management;
/// <summary>
/// Service for managing remote peer configurations.
/// Provides CRUD operations for adding, removing, enabling/disabling remote cloud nodes.
/// </summary>
public interface IPeerManagementService
{
/// <summary>
/// Adds a static remote peer with simple authentication.
/// </summary>
/// <param name="nodeId">Unique identifier for the remote peer.</param>
/// <param name="address">Network address (hostname:port) of the remote peer.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task AddStaticPeerAsync(string nodeId, string address, CancellationToken cancellationToken = default);
/// <summary>
/// Removes a remote peer configuration.
/// </summary>
/// <param name="nodeId">Unique identifier of the peer to remove.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task RemoveRemotePeerAsync(string nodeId, CancellationToken cancellationToken = default);
/// <summary>
/// Removes confirmation tracking for a peer and optionally removes static remote configuration.
/// </summary>
/// <param name="nodeId">Unique identifier of the peer to untrack.</param>
/// <param name="removeRemoteConfig">When true, also removes static remote peer configuration.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task RemovePeerTrackingAsync(
string nodeId,
bool removeRemoteConfig = true,
CancellationToken cancellationToken = default);
/// <summary>
/// Retrieves all configured remote peers.
/// </summary>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>Collection of remote peer configurations.</returns>
Task<IEnumerable<RemotePeerConfiguration>> GetAllRemotePeersAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Enables synchronization with a remote peer.
/// </summary>
/// <param name="nodeId">Unique identifier of the peer to enable.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task EnablePeerAsync(string nodeId, CancellationToken cancellationToken = default);
/// <summary>
/// Disables synchronization with a remote peer (keeps configuration).
/// </summary>
/// <param name="nodeId">Unique identifier of the peer to disable.</param>
/// <param name="cancellationToken">Cancellation token.</param>
Task DisablePeerAsync(string nodeId, CancellationToken cancellationToken = default);
}