IAdapterService
Namespace: Meshmakers.Octo.Sdk.Common.Adapters
Interface for the adapter service that allows to start and stop a adapter
public interface IAdapterService
Remarks:
This interface needs to be implemented by the adapter assembly and registered in the DI container.
Methods
StartupAsync(AdapterStartup, List<DeploymentUpdateErrorMessageDto>, CancellationToken)
Gets called when the adapter service should start.
Task<bool> StartupAsync(AdapterStartup adapterStartup, List<DeploymentUpdateErrorMessageDto> errorMessages, CancellationToken stoppingToken)
Parameters
adapterStartup AdapterStartup
Startup configuration
errorMessages List<DeploymentUpdateErrorMessageDto>
A list of error messages that occurred during the startup
stoppingToken CancellationToken
The cancellation token to stop the operation of the adapter
Returns
ShutdownAsync(AdapterShutdown, CancellationToken)
Gets called when the adapter service should stop.
Task ShutdownAsync(AdapterShutdown adapterShutdown, CancellationToken stoppingToken)
Parameters
adapterShutdown AdapterShutdown
Shutdown configuration
stoppingToken CancellationToken
The cancellation token to stop the operation of the adapter
Returns
ConfigurationUpdatedAsync(String, AdapterConfigurationDto, CancellationToken)
Gets called when the adapter's configuration was updated at runtime (e.g. via "Update Configuration" in Refinery Studio) without a full restart.
Task ConfigurationUpdatedAsync(string tenantId, AdapterConfigurationDto adapterConfiguration, CancellationToken stoppingToken)
Parameters
tenantId String
Tenant identifier
adapterConfiguration AdapterConfigurationDto
The updated adapter configuration
stoppingToken CancellationToken
The cancellation token to stop the operation of the adapter
Returns
Remarks:
Pipelines are updated selectively by the SDK independently of this call, so the adapter must not re-register or tear down pipelines here. Override this only to apply the updated adapter-level configuration (). The default implementation is a no-op, so adapters without adapter-level configuration are unaffected.
CkModelChangedAsync(String)
Gets called when the tenant's Construction Kit model may have changed (CK model import, cache clear). Adapters that hold an in-process CK model cache must invalidate it here so subsequent pipeline executions validate against the current model (AB#4456).
Task CkModelChangedAsync(string tenantId)
Parameters
tenantId String
Tenant identifier
Returns
Remarks:
Default implementation is a no-op so adapters without a CK cache are unaffected. The adapter is not restarted; running pipelines keep their registrations.