1 instantiation of RedisResource
Aspire.Hosting.Redis.Tests (1)
RedisPublicApiTests.cs (1)
155var action = () => new RedisResource(name);
46 references to RedisResource
Aspire.Hosting.Azure.Redis (11)
AzureRedisCacheResource.cs (2)
36internal RedisResource? InnerResource { get; private set; } 50internal void SetInnerResource(RedisResource innerResource)
AzureRedisExtensions.cs (8)
6using RedisResource = Aspire.Hosting.ApplicationModel.RedisResource; 27public static IResourceBuilder<RedisResource> PublishAsAzureRedis(this IResourceBuilder<RedisResource> builder) 33private static IResourceBuilder<RedisResource> PublishAsAzureRedisInternal(this IResourceBuilder<RedisResource> builder, bool useProvisioner) 87public static IResourceBuilder<RedisResource> AsAzureRedis(this IResourceBuilder<RedisResource> builder) 180Action<IResourceBuilder<RedisResource>>? configureContainer = null)
AzureRedisResource.cs (1)
14public class AzureRedisResource(RedisResource innerResource, Action<AzureResourceInfrastructure> configureInfrastructure) :
Aspire.Hosting.Redis (26)
RedisBuilderExtensions.cs (26)
39public static IResourceBuilder<RedisResource> AddRedis(this IDistributedApplicationBuilder builder, [ResourceName] string name, int? port = null) 43var redis = new RedisResource(name); 61.WithEndpoint(port: port, targetPort: 6379, name: RedisResource.PrimaryEndpointName) 68/// Configures a container resource for Redis Commander which is pre-configured to connect to the <see cref="RedisResource"/> that this method is used on. 73/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param> 77public static IResourceBuilder<RedisResource> WithRedisCommander(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisCommanderResource>>? configureContainer = null, string? containerName = null) 100var redisInstances = builder.ApplicationBuilder.Resources.OfType<RedisResource>(); 110foreach (var redisInstance in redisInstances) 133/// Configures a container resource for Redis Insight which is pre-configured to connect to the <see cref="RedisResource"/> that this method is used on. 138/// <param name="builder">The <see cref="IResourceBuilder{T}"/> for the <see cref="RedisResource"/>.</param> 142public static IResourceBuilder<RedisResource> WithRedisInsight(this IResourceBuilder<RedisResource> builder, Action<IResourceBuilder<RedisInsightResource>>? configureContainer = null, string? containerName = null) 174var redisInstances = builder.ApplicationBuilder.Resources.OfType<RedisResource>(); 202static async Task ImportRedisDatabases(ILogger resourceLogger, IEnumerable<RedisResource> redisInstances, HttpClient client, CancellationToken cancellationToken) 231foreach (var redisResource in redisInstances) 355/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.: 369public static IResourceBuilder<RedisResource> WithDataVolume(this IResourceBuilder<RedisResource> builder, string? name = null, bool isReadOnly = false) 385/// Use <see cref="WithPersistence(IResourceBuilder{RedisResource}, TimeSpan?, long)"/> to adjust Redis persistence configuration, e.g.: 399public static IResourceBuilder<RedisResource> WithDataBindMount(this IResourceBuilder<RedisResource> builder, string source, bool isReadOnly = false) 416/// Use with <see cref="WithDataBindMount(IResourceBuilder{RedisResource}, string, bool)"/> 417/// or <see cref="WithDataVolume(IResourceBuilder{RedisResource}, string?, bool)"/> to persist Redis data across sessions with custom persistence configuration, e.g.: 428public static IResourceBuilder<RedisResource> WithPersistence(this IResourceBuilder<RedisResource> builder, TimeSpan? interval = null, long keysChangedThreshold = 1)
Aspire.Hosting.Redis.Tests (9)
AddRedisTests.cs (4)
33var containerResource = Assert.Single(appModel.Resources.OfType<RedisResource>()); 61var containerResource = Assert.Single(appModel.Resources.OfType<RedisResource>());
RedisPublicApiTests.cs (5)
41IResourceBuilder<RedisResource> builder = null!; 52IResourceBuilder<RedisResource> builder = null!; 87IResourceBuilder<RedisResource> builder = null!; 98IResourceBuilder<RedisResource> builder = null!; 123IResourceBuilder<RedisResource> builder = null!;