public HystrixRequestLogVariable()
     : base(() => new HystrixRequestLog(), (log) =>
 {
     HystrixRequestEventsStream.GetInstance().Write(log.AllExecutedCommands);
 })
 {
 }
        public void Constructor_SetsupStream()
        {
            var stream     = HystrixRequestEventsStream.GetInstance();
            var controller = new HystrixRequestEventStreamController(stream);

            Assert.NotNull(controller.SampleStream);
        }
Exemple #3
0
        public static void AddHystrixRequestEventStream(this IServiceCollection services, IConfiguration config)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            services.AddSingleton <HystrixRequestEventsStream>(HystrixRequestEventsStream.GetInstance());
        }
        public static void RegisterHystrixRequestEventStream(this ContainerBuilder container, IConfiguration config)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            container.RegisterInstance(HystrixRequestEventsStream.GetInstance()).SingleInstance();
        }
Exemple #5
0
 public HystrixRequestEventStreamController(HystrixRequestEventsStream stream)
     : this(stream.Observe())
 {
 }
 public static void AddHystrixRequestEventStream(this IServiceCollection services, IConfiguration config)
 {
     services.AddSingleton <HystrixRequestEventsStream>(HystrixRequestEventsStream.GetInstance());
 }