public DashboardTelemetryProducer(ILocalSiloDetails localSiloDetails, IGrainFactory grainFactory, IExternalDispatcher dispatcher) { this.localSiloDetails = localSiloDetails; this.grainFactory = grainFactory; this.dispatcher = dispatcher; // register timer to report every second timer = new Timer(x => Flush(), null, 1 * 1000, 1 * 1000); }
public Task Init(string name, IProviderRuntime providerRuntime, IProviderConfiguration config) { Name = name; dispatcher = providerRuntime.ServiceProvider.GetRequiredService <IExternalDispatcher>(); runtime = providerRuntime; return(Task.CompletedTask); }
public DashboardMiddleware(RequestDelegate next, IGrainFactory grainFactory, IExternalDispatcher dispatcher, IOptions <DashboardOptions> options, DashboardLogger logger) { this.grainFactory = grainFactory; this.dispatcher = dispatcher; this.options = options; this.logger = logger; this.next = next; }
public GrainProfiler( IServiceProvider services, IExternalDispatcher dispatcher, ILogger <GrainProfiler> logger) { this.dispatcher = dispatcher; this.services = services; this.logger = logger; formatMethodName = services.GetService <Func <IGrainCallContext, string> >() ?? DefaultFormatter; // register timer to report every second timer = new Timer(ProcessStats, null, 1 * 1000, 1 * 1000); }
public GrainProfiler( ILogger <GrainProfiler> logger, ILocalSiloDetails localSiloDetails, IExternalDispatcher dispatcher, IServiceProvider services, IGrainFactory grainFactory) { this.dispatcher = dispatcher; this.logger = logger; this.localSiloDetails = localSiloDetails; this.grainFactory = grainFactory; formatMethodName = services.GetService <Func <IIncomingGrainCallContext, string> >() ?? DefaultFormatter; // register timer to report every second timer = new Timer(ProcessStats, null, 1 * 1000, 1 * 1000); }
public GrainProfiler( ILogger <GrainProfiler> logger, ILocalSiloDetails localSiloDetails, IExternalDispatcher dispatcher, GrainMethodFormatterDelegate formatMethodName, IGrainFactory grainFactory) { this.dispatcher = dispatcher; this.logger = logger; this.localSiloDetails = localSiloDetails; this.grainFactory = grainFactory; this.formatMethodName = formatMethodName; // register timer to report every second timer = new Timer(ProcessStats, null, 1 * 1000, 1 * 1000); }
internal static IServiceCollection AddServicesForHostedDashboard(this IServiceCollection services, IGrainFactory grainFactory, IExternalDispatcher dispatcher, DashboardOptions options) { services.AddSingleton(DashboardLogger.Instance); services.AddSingleton(Options.Create(options)); services.AddSingleton <ILoggerProvider>(DashboardLogger.Instance); services.AddSingleton(dispatcher); services.AddSingleton(grainFactory); return(services); }
public MessageDispatcher(IMessageDispatcherProvider dispatcherProvider, IExternalDispatcher externalDispatcher) { _dispatcherProvider = dispatcherProvider ?? throw new ArgumentNullException(nameof(dispatcherProvider)); _externalDispatcher = externalDispatcher ?? throw new ArgumentNullException(nameof(externalDispatcher)); }