Add tests and implement StubBearer authentication for Signer endpoints
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Docs CI / lint-and-preview (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Docs CI / lint-and-preview (push) Has been cancelled
				
			- Created SignerEndpointsTests to validate the SignDsse and VerifyReferrers endpoints. - Implemented StubBearerAuthenticationDefaults and StubBearerAuthenticationHandler for token-based authentication. - Developed ConcelierExporterClient for managing Trivy DB settings and export operations. - Added TrivyDbSettingsPageComponent for UI interactions with Trivy DB settings, including form handling and export triggering. - Implemented styles and HTML structure for Trivy DB settings page. - Created NotifySmokeCheck tool for validating Redis event streams and Notify deliveries.
This commit is contained in:
		
							
								
								
									
										51
									
								
								src/StellaOps.Notify.Engine/ChannelHealthContracts.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								src/StellaOps.Notify.Engine/ChannelHealthContracts.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Threading; | ||||
| using System.Threading.Tasks; | ||||
| using StellaOps.Notify.Models; | ||||
|  | ||||
| namespace StellaOps.Notify.Engine; | ||||
|  | ||||
| /// <summary> | ||||
| /// Contract implemented by channel plug-ins to provide health diagnostics. | ||||
| /// </summary> | ||||
| public interface INotifyChannelHealthProvider | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Channel type supported by the provider. | ||||
|     /// </summary> | ||||
|     NotifyChannelType ChannelType { get; } | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Executes a health check for the supplied channel. | ||||
|     /// </summary> | ||||
|     Task<ChannelHealthResult> CheckAsync(ChannelHealthContext context, CancellationToken cancellationToken); | ||||
| } | ||||
|  | ||||
| /// <summary> | ||||
| /// Immutable context describing a channel health request. | ||||
| /// </summary> | ||||
| public sealed record ChannelHealthContext( | ||||
|     string TenantId, | ||||
|     NotifyChannel Channel, | ||||
|     string Target, | ||||
|     DateTimeOffset Timestamp, | ||||
|     string TraceId); | ||||
|  | ||||
| /// <summary> | ||||
| /// Result returned by channel plug-ins when reporting health diagnostics. | ||||
| /// </summary> | ||||
| public sealed record ChannelHealthResult( | ||||
|     ChannelHealthStatus Status, | ||||
|     string? Message, | ||||
|     IReadOnlyDictionary<string, string> Metadata); | ||||
|  | ||||
| /// <summary> | ||||
| /// Supported channel health states. | ||||
| /// </summary> | ||||
| public enum ChannelHealthStatus | ||||
| { | ||||
|     Healthy, | ||||
|     Degraded, | ||||
|     Unhealthy | ||||
| } | ||||
		Reference in New Issue
	
	Block a user