public RedisMembershipTable(IOptions <RedisClusteringOptions> redisOptions, IOptions <ClusterOptions> clusterOptions) { _redisOptions = redisOptions.Value; _clusterOptions = clusterOptions.Value; _clusterKey = $"{_clusterOptions.ServiceId}/{_clusterOptions.ClusterId}"; _jsonSerializerSettings = JsonSettings.JsonSerializerSettings; }
public RedisGatewayListProvider(IOptions <RedisClusteringOptions> membershipTableOptions, IOptions <ClusterOptions> clusterOptions, ILog logger = null) { this.logger = logger; options = membershipTableOptions.Value; ConfigurationOptions configOptions = GetRedisConfiguration(); clusterId = clusterOptions.Value.ClusterId; connection = ConnectionMultiplexer.Connect(configOptions); database = connection.GetDatabase(); serializer = new BinarySerializer(); }
/// <summary> /// The default multiplexer creation delegate. /// </summary> public static async Task <IConnectionMultiplexer> DefaultCreateMultiplexer(RedisClusteringOptions options) { return(await ConnectionMultiplexer.ConnectAsync(options.ConnectionString)); }