Zum Hauptinhalt springen

AdapterHealthFileService

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

Background service that writes a health file when the adapter is connected to the communication hub. This enables Kubernetes exec-based liveness/readiness probes for non-web adapters.

public class AdapterHealthFileService : BackgroundService, IHostedService, IDisposable

Inheritance Object → BackgroundService → AdapterHealthFileService
Implements IHostedService, IDisposable

Fields​

HealthFilePath​

The path to the health file. Kubernetes exec probes check for this file's existence.

public static string HealthFilePath;

Properties​

ExecuteTask​

public Task ExecuteTask { get; }

Property Value​

Task

Constructors​

AdapterHealthFileService(IAdapterHubClient)​

Background service that writes a health file when the adapter is connected to the communication hub. This enables Kubernetes exec-based liveness/readiness probes for non-web adapters.

public AdapterHealthFileService(IAdapterHubClient adapterHubClient)

Parameters​

adapterHubClient IAdapterHubClient

Methods​

ExecuteAsync(CancellationToken)​

protected Task ExecuteAsync(CancellationToken stoppingToken)

Parameters​

stoppingToken CancellationToken

Returns​

Task