using Opc.Ua;
namespace ZB.MOM.WW.OtOpcUa.Client.Shared.Adapters;
///
/// Abstracts OPC UA endpoint discovery for testability.
///
internal interface IEndpointDiscovery
{
///
/// Discovers endpoints at the given URL and returns the best match for the requested security mode.
/// Also rewrites the endpoint URL hostname to match the requested URL when they differ.
///
/// The OPC UA application configuration.
/// The endpoint URL to discover.
/// The requested message security mode.
/// Cancellation token.
/// The best-matching endpoint description, with its URL hostname rewritten to match when they differ.
Task SelectEndpointAsync(ApplicationConfiguration config, string endpointUrl,
MessageSecurityMode requestedMode, CancellationToken ct = default);
}