Exemplo n.º 1
0
        private static ISiloBuilder UseDevelopment(this ISiloBuilder siloHost, AppSiloBuilderContext context)
        {
            siloHost
            .ConfigureServices(services =>
            {
                //services.Configure<GrainCollectionOptions>(options => { options.CollectionAge = TimeSpan.FromMinutes(1.5); });
            });

            return(siloHost);
        }
Exemplo n.º 2
0
        public static ISiloBuilder UseAppConfiguration(this ISiloBuilder siloHost, AppSiloBuilderContext context)
        {
            _defaultProviderType = context.SiloOptions.StorageProviderType ?? StorageProviderType.Memory;

            var appInfo = context.AppInfo;

            siloHost
            .AddMemoryGrainStorageAsDefault()
            .Configure <ClusterOptions>(options =>
            {
                options.ClusterId = appInfo.ClusterId;
                options.ServiceId = appInfo.Name;
            });

            siloHost.UseDevelopment(context);
            siloHost.UseDevelopmentClustering(context);

            return(siloHost);
        }
Exemplo n.º 3
0
        private static ISiloBuilder UseDevelopmentClustering(this ISiloBuilder siloHost, AppSiloBuilderContext context)
        {
            var siloAddress = IPAddress.Loopback;
            var siloPort    = context.SiloOptions.SiloPort;
            var gatewayPort = context.SiloOptions.GatewayPort;

            return(siloHost
                   .UseLocalhostClustering(siloPort: siloPort, gatewayPort: gatewayPort)
                   );
        }