Class DiscoveryClient
Provides the abstract class for the capability for discovering services.
Inheritance
Namespace: Copper.Discovery.Common
Assembly: Copper.Discovery.Common.dll
Syntax
public class DiscoveryClient
Constructors
View SourceDiscoveryClient(IRequestReceiver, IEventPublisher, IServiceDiscoveryMetadataProvider)
Initializes a new instance of the Discovery
Declaration
public DiscoveryClient(IRequestReceiver requestReceiver, IEventPublisher eventPublisher, IServiceDiscoveryMetadataProvider serviceDiscoveryMetadataProvider)
Parameters
Type | Name | Description |
---|---|---|
IRequest |
requestReceiver | The request receiver. |
IEvent |
eventPublisher | The event publisher. |
IService |
serviceDiscoveryMetadataProvider | The service discovery metadata provider. |
Methods
View SourceDiscover(TimeSpan)
Attempts to discover services until the timeout has expired.
Declaration
public Task<ServiceDiscoveryResponse[]> Discover(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System. |
timeout | The timeout. |
Returns
Type | Description |
---|---|
System. |
A System. |
Discover(TimeSpan, ServiceDiscoveryCriteria, Int32)
Attempts to discover services matching the provided Service
Declaration
public async Task<ServiceDiscoveryResponse> Discover(TimeSpan timeout, ServiceDiscoveryCriteria serviceDiscoveryCriteria, int expectedResponseCount)
Parameters
Type | Name | Description |
---|---|---|
System. |
timeout | The timeout. |
Service |
serviceDiscoveryCriteria | The service discovery criteria. |
System. |
expectedResponseCount | The expected response count. |
Returns
Type | Description |
---|---|
System. |
A System. |