Cloudfoundry actuator endpoints in a .net core console application hosted by GenericHost

892 views Asked by At

I have a question about CloudFoundry actuator endpoints in a .net core console application using Steeltoe. I am planning to use generic host https://jmezach.github.io/2017/10/29/having-fun-with-the-.net-core-generic-host/ to perform some background task. I would like to use few actuator endpoints e.g.Health actuator. I could find samples with WebHost here https://github.com/SteeltoeOSS/Samples/blob/dev/Management/src/AspDotNetCore/CloudFoundry/Startup.cs. The below code needs IApplicationBuilder

// Add management endpoints into pipeline
            app.UseCloudFoundryActuators();

So it is possible to use actuator endpoints in a console application which is hosted by generic host. Any samples are most welcome. Thanks in advance.

1

There are 1 answers

1
Tim On

Steeltoe 3.0 added a variety of extensions for using Management/Actuators with HostBuilder. Check out this file for some examples.

It would also be possible to add another implementation of the actuator endpoints that communicate over something other than HTTP (perhaps RabbitMQ as an example), Steeltoe Management was built with portable base endpoint functionality in mind - but then you would also need a new application for interacting with them, and you wouldn't be able to use them with Apps Manager on PCF.