up
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Policy Simulation / policy-simulate (push) Has been cancelled
SDK Publish & Sign / sdk-publish (push) Has been cancelled

This commit is contained in:
master
2025-11-27 15:05:48 +02:00
parent 4831c7fcb0
commit e950474a77
278 changed files with 81498 additions and 672 deletions

View File

@@ -0,0 +1,62 @@
namespace StellaOps.Notifier.Worker.Channels;
/// <summary>
/// Configuration options for channel adapters.
/// </summary>
public sealed class ChannelAdapterOptions
{
/// <summary>
/// Configuration section name.
/// </summary>
public const string SectionName = "ChannelAdapters";
/// <summary>
/// Maximum number of retry attempts for failed dispatches.
/// </summary>
public int MaxRetries { get; set; } = 3;
/// <summary>
/// Base delay for exponential backoff between retries.
/// </summary>
public TimeSpan RetryBaseDelay { get; set; } = TimeSpan.FromSeconds(1);
/// <summary>
/// Maximum delay between retries.
/// </summary>
public TimeSpan RetryMaxDelay { get; set; } = TimeSpan.FromSeconds(30);
/// <summary>
/// Timeout for individual dispatch operations.
/// </summary>
public TimeSpan DispatchTimeout { get; set; } = TimeSpan.FromSeconds(30);
/// <summary>
/// Enable HMAC signing for webhook payloads.
/// </summary>
public bool EnableHmacSigning { get; set; } = true;
/// <summary>
/// User agent string for HTTP requests.
/// </summary>
public string UserAgent { get; set; } = "StellaOps-Notifier/1.0";
/// <summary>
/// Default concurrency limit per channel type.
/// </summary>
public int DefaultConcurrency { get; set; } = 10;
/// <summary>
/// Enable circuit breaker for unhealthy channels.
/// </summary>
public bool EnableCircuitBreaker { get; set; } = true;
/// <summary>
/// Number of consecutive failures before circuit opens.
/// </summary>
public int CircuitBreakerThreshold { get; set; } = 5;
/// <summary>
/// Duration to keep circuit open before allowing retry.
/// </summary>
public TimeSpan CircuitBreakerDuration { get; set; } = TimeSpan.FromMinutes(1);
}