< Summary - AsyncResponse (Release / net8.0+net10.0 / unit+integration)

Information
Class: AsyncResponse.Channels.Redis.RedisKeySchema
Assembly: AsyncResponse.Channels.Redis
File(s): /home/runner/work/AsyncResponse/AsyncResponse/src/Channels/AsyncResponse.Channels.Redis/RedisKeySchema.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_RecoveryKeyPattern()100%11100%
Channel(...)100%11100%
RecoveryKey(...)100%11100%
CorrelationIdFromRecoveryKey(...)100%11100%

File(s)

/home/runner/work/AsyncResponse/AsyncResponse/src/Channels/AsyncResponse.Channels.Redis/RedisKeySchema.cs

#LineLine coverage
 1using StackExchange.Redis;
 2
 3namespace AsyncResponse.Channels.Redis;
 4
 5/// <summary>
 6/// The single source of truth for Redis key/channel shapes, shared by the channel and the
 7/// watchdog. Key shapes are a storage contract: changing them orphans in-flight recovery state.
 8/// </summary>
 39internal sealed class RedisKeySchema(string _keyPrefix)
 10{
 311    public string RecoveryKeyPattern => $"{_keyPrefix}:recovery:*";
 12
 13    /// <summary>Runs the Channel operation.</summary>
 14    public RedisChannel Channel(string correlationId)
 315        => new($"{_keyPrefix}:response:{correlationId}", RedisChannel.PatternMode.Literal);
 16
 17    /// <summary>Runs the RecoveryKey operation.</summary>
 318    public string RecoveryKey(string correlationId) => $"{_keyPrefix}:recovery:{correlationId}";
 19
 20    /// <summary>Runs the CorrelationIdFromRecoveryKey operation.</summary>
 21    public string CorrelationIdFromRecoveryKey(string recoveryKey)
 322        => recoveryKey[$"{_keyPrefix}:recovery:".Length..];
 23}