예제 #1
0
        protected override IMembershipTable CreateMembershipTable(ILogger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulClusteringSiloOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>(), Options.Create(options), this.clusterOptions));
        }
예제 #2
0
        protected override IGatewayListProvider CreateGatewayListProvider(ILogger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulClusteringClientOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulGatewayListProvider(loggerFactory.CreateLogger <ConsulGatewayListProvider>(), Options.Create(options), this.gatewayOptions, this.clusterOptions));
        }
        protected override IMembershipTable CreateMembershipTable(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulMembershipOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>(), Options.Create <ConsulMembershipOptions>(options), this.globalConfiguration));
        }
예제 #4
0
        public override TestCluster CreateTestCluster()
        {
            ConsulTestUtils.EnsureConsul();

            var options = new TestClusterOptions(2);

            options.ClusterConfiguration.Globals.DataConnectionString = ConsulTestUtils.CONSUL_ENDPOINT;
            options.ClusterConfiguration.Globals.ReminderServiceType  = GlobalConfiguration.ReminderServiceProviderType.Disabled;
            options.ClusterConfiguration.PrimaryNode = null;
            options.ClusterConfiguration.Globals.SeedNodes.Clear();
            return(new TestCluster(options).UseSiloBuilderFactory <SiloBuilderFactory>()
                   .UseClientBuilderFactory(clientBuilderFactory));
        }
예제 #5
0
 protected override void ConfigureTestCluster(TestClusterBuilder builder)
 {
     ConsulTestUtils.EnsureConsul();
     builder.ConfigureLegacyConfiguration(legacy =>
     {
         legacy.ClusterConfiguration.Globals.DataConnectionString = ConsulTestUtils.CONSUL_ENDPOINT;
         legacy.ClusterConfiguration.Globals.ReminderServiceType  = GlobalConfiguration.ReminderServiceProviderType.Disabled;
         legacy.ClusterConfiguration.PrimaryNode = null;
         legacy.ClusterConfiguration.Globals.SeedNodes.Clear();
     });
     builder.AddSiloBuilderConfigurator <SiloBuilderConfigurator>();
     builder.AddClientBuilderConfigurator <ClientBuilderConfigurator>();
 }
예제 #6
0
        public override TestCluster CreateTestCluster()
        {
            ConsulTestUtils.EnsureConsul();

            var options = new TestClusterOptions(2);

            options.ClusterConfiguration.Globals.DataConnectionString    = ConsulTestUtils.CONSUL_ENDPOINT;
            options.ClusterConfiguration.Globals.LivenessType            = GlobalConfiguration.LivenessProviderType.Custom;
            options.ClusterConfiguration.Globals.MembershipTableAssembly = "OrleansConsulUtils";
            options.ClusterConfiguration.Globals.ReminderServiceType     = GlobalConfiguration.ReminderServiceProviderType.Disabled;
            options.ClusterConfiguration.PrimaryNode = null;
            options.ClusterConfiguration.Globals.SeedNodes.Clear();
            return(new TestCluster(options));
        }
예제 #7
0
 protected override async Task <string> GetConnectionString()
 {
     return(await ConsulTestUtils.EnsureConsulAsync() ? ConsulTestUtils.CONSUL_ENDPOINT : null);
 }
예제 #8
0
        protected override IGatewayListProvider CreateGatewayListProvider(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>()));
        }
예제 #9
0
        protected override IMembershipTable CreateMembershipTable(Logger logger)
        {
            ConsulTestUtils.EnsureConsul();

            return(new ConsulBasedMembershipTable(loggerFactory.CreateLogger <ConsulBasedMembershipTable>()));
        }
예제 #10
0
 protected override void ConfigureTestCluster(TestClusterBuilder builder)
 {
     ConsulTestUtils.EnsureConsul();
     builder.AddSiloBuilderConfigurator <SiloBuilderConfigurator>();
     builder.AddClientBuilderConfigurator <ClientBuilderConfigurator>();
 }