Aspire as ChaosMonkey

If I have all Aspire resources exposed , would not be easy to expose the endpoints to START and STOP the resources  ? And from idea to implementation – it is pretty easy .

1. Add a WebApp  => var builder = WebApplication.CreateBuilder();    

  
2. Expose List as API – Use  ResourceNotificationService.TryGetCurrentState to see the resource state

3. Expose Start and Stop using ResourceCommandService.ExecuteCommandAsync and KnownResourceCommands to start and stop the resource

4. Use Visual API to make macro for this.

See the image below

See https://github.com/ignatandrei/aspireExtensions/blob/main/src/AspireResourceExtensions/README.md and the nuget https://www.nuget.org/packages/AspireExtensionsResource


Posted

in

, , ,

by

Tags: