public ReceiveEndpointClientFactoryContext(ReceiveEndpointReady receiveEndpointReady, RequestTimeout defaultTimeout = default) { _receiveEndpoint = receiveEndpointReady.ReceiveEndpoint; ResponseAddress = receiveEndpointReady.InputAddress; DefaultTimeout = defaultTimeout.Or(RequestTimeout.Default); }
Task IReceiveEndpointObserver.Ready(ReceiveEndpointReady ready) { _handle.Disconnect(); _registration.Dispose(); return(_ready.TrySetResultOnThreadPool(ready)); }
public Task Ready(ReceiveEndpointReady ready) { _serviceEndpoint.Started = DateTime.UtcNow; _serviceEndpoint.DisconnectConfigurationObservers(); return(_serviceEndpoint.NotifyUp()); }
/// <summary> /// Connects a client factory to a host receive endpoint, using the bus as the send endpoint provider /// </summary> /// <param name="receiveEndpointHandle">A handle to the receive endpoint, which is stopped when the client factory is disposed</param> /// <param name="timeout"></param> /// <returns></returns> public static async Task <IClientFactory> CreateClientFactory(this HostReceiveEndpointHandle receiveEndpointHandle, RequestTimeout timeout = default) { ReceiveEndpointReady ready = await receiveEndpointHandle.Ready.ConfigureAwait(false); var context = new HostReceiveEndpointClientFactoryContext(receiveEndpointHandle, ready, timeout); return(new ClientFactory(context)); }
public Task Ready(ReceiveEndpointReady ready) { LogContext.Debug?.Log("Endpoint Ready: {InputAddress}", ready.InputAddress); ready.ReceiveEndpoint.ConnectPublishObserver(_publishObserver); return(TaskUtil.Completed); }
Task IReceiveEndpointObserver.Ready(ReceiveEndpointReady ready) { _ready.TrySetResult(ready); _handle.Disconnect(); return(TaskUtil.Completed); }
public Task SetReady(ReceiveEndpointReady ready) { _handle.Disconnect(); _registration.Dispose(); _ready.TrySetResult(ready); return(Util.TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { _serviceEndpoint.Started = DateTime.UtcNow; _serviceEndpoint.DisconnectObservers(); Task.Run(() => _serviceEndpoint.NotifyUp()); return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { if (ready.InputAddress == _harness.InputQueueAddress) { _receiveEndpoint = ready.ReceiveEndpoint; } return(Task.CompletedTask); }
public Task Ready(ReceiveEndpointReady ready) { if (_log.IsDebugEnabled) { _log.Debug($"Endpoint Ready: {ready.InputAddress}"); } ready.ReceiveEndpoint.ConnectPublishObserver(_publishObserver); return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { lock (_killSwitches) { if (!_killSwitches.TryGetValue(ready.InputAddress, out var killSwitch)) { killSwitch = new KillSwitch(_options, ready.ReceiveEndpoint); _killSwitches.Add(ready.InputAddress, killSwitch); ready.ReceiveEndpoint.ConnectConsumeObserver(killSwitch); } } return(Task.CompletedTask); }
public HostReadyEvent(Uri hostAddress, ReceiveEndpointReady[] receiveEndpoints) { HostAddress = hostAddress; ReceiveEndpoints = receiveEndpoints; }
Task IReceiveEndpointObserver.Ready(ReceiveEndpointReady ready) { _handle.Disconnect(); return(Task.Factory.StartNew(() => _ready.TrySetResult(ready), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default)); }
public Task Ready(ReceiveEndpointReady ready) { GetEndpoint(ready.InputAddress).Ready = true; return(Health.Done); }
public Task Ready(ReceiveEndpointReady ready) { PrometheusMetrics.EndpointReady(ready); return(Task.CompletedTask); }
public HostReceiveEndpointClientFactoryContext(HostReceiveEndpointHandle receiveEndpointHandle, ReceiveEndpointReady receiveEndpointReady, RequestTimeout defaultTimeout = default) : base(receiveEndpointReady, defaultTimeout) { _receiveEndpointHandle = receiveEndpointHandle; }
public Task Ready(ReceiveEndpointReady ready) { return(Console.Out.WriteLineAsync($"Endpoint Ready: {ready.InputAddress}")); }
Task IReceiveEndpointObserver.Ready(ReceiveEndpointReady ready) { return(_handles.ForEachAsync(x => x.SetReady(ready))); }
public Task Ready(ReceiveEndpointReady ready) { return(ForEachAsync(x => x.Ready(ready))); }
public Task Ready(ReceiveEndpointReady ready) { return(_endpointHealth.Ready(ready)); }
public Task Ready(ReceiveEndpointReady ready) { return Console.Out.WriteLineAsync($"Endpoint Ready: {ready.InputAddress}"); }
public Task Ready(ReceiveEndpointReady ready) { _receiveEndpoint.TrySetResult(ready.ReceiveEndpoint); return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { return(_machine.RaiseEvent(_endpoint, x => x.ReceiveEndpointReady, ready)); }
/// <summary> /// Connects a client factory to a host receive endpoint, using the bus as the send endpoint provider /// </summary> /// <param name="receiveEndpoint"></param> /// <param name="timeout"></param> /// <returns></returns> public static IClientFactory CreateClientFactory(this ReceiveEndpointReady receiveEndpoint, RequestTimeout timeout = default) { var context = new ReceiveEndpointClientFactoryContext(receiveEndpoint, timeout); return(new ClientFactory(context)); }
public Task Ready(ReceiveEndpointReady ready) { _logger.LogDebug("Endpoint is ready to use: {@endpoint}", ready.ReceiveEndpoint); return(Task.CompletedTask); }
public void OnReady(ReceiveEndpointReady ready) { Ready = true; Message = ready.IsStarted ? "ready" : "ready (not started)"; }
public static void EndpointReady(ReceiveEndpointReady ready) { var endpointLabel = GetEndpointLabel(ready.InputAddress); _endpointInstances.WithLabels(_serviceLabel, endpointLabel).Inc(); }
public Task Ready(ReceiveEndpointReady ready) { GetEndpoint(ready.InputAddress).Ready = true; return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { ready.ReceiveEndpoint.ConnectPublishObserver(_publishObserver); return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { GetEndpoint(ready); return(TaskUtil.Completed); }
public Task Ready(ReceiveEndpointReady ready) { return(_serviceEndpoint.NotifyEndpointReady(ready.ReceiveEndpoint)); }