public void DetectEndpointFromLocalAudit(EndpointDetails newEndpointDetails) { var endpointInstanceId = newEndpointDetails.ToInstanceId(); if (endpoints.TryAdd(endpointInstanceId.UniqueId, new EndpointInstanceMonitor(endpointInstanceId, false, domainEvents))) { domainEvents.Raise(new NewEndpointDetected { DetectedAt = DateTime.UtcNow, Endpoint = newEndpointDetails }); } }
public async Task DetectEndpointFromHeartbeatStartup(EndpointDetails newEndpointDetails, DateTime startedAt) { var endpointInstanceId = newEndpointDetails.ToInstanceId(); endpoints.GetOrAdd(endpointInstanceId.UniqueId, id => new EndpointInstanceMonitor(endpointInstanceId, true, domainEvents)); await domainEvents.Raise(new EndpointStarted { EndpointDetails = newEndpointDetails, StartedAt = startedAt }).ConfigureAwait(false); }
public void DetectEndpointFromHeartbeatStartup(EndpointDetails newEndpointDetails, DateTime startedAt) { var endpointInstanceId = newEndpointDetails.ToInstanceId(); endpoints.GetOrAdd(endpointInstanceId.UniqueId, id => new EndpointInstanceMonitor(endpointInstanceId, true, domainEvents)); domainEvents.Raise(new EndpointStarted { EndpointDetails = newEndpointDetails, StartedAt = startedAt }); }
public async Task EndpointDetected(EndpointDetails newEndpointDetails) { var endpointInstanceId = newEndpointDetails.ToInstanceId(); if (endpoints.TryAdd(endpointInstanceId.UniqueId, new EndpointInstanceMonitor(endpointInstanceId, false, domainEvents))) { await domainEvents.Raise(new EndpointDetected { DetectedAt = DateTime.UtcNow, Endpoint = newEndpointDetails }).ConfigureAwait(false); } }
public void DetectEndpointFromRemoteAudit(EndpointDetails newEndpointDetails) { var endpointInstanceId = newEndpointDetails.ToInstanceId(); endpoints.GetOrAdd(endpointInstanceId.UniqueId, id => new EndpointInstanceMonitor(endpointInstanceId, false, domainEvents)); }