Method AddSsh
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- SshSharp.Extensions.DependencyInjection.dll
AddSsh(IHealthChecksBuilder, string, string?, HealthStatus?, IEnumerable<string>?, TimeSpan?)
Adds a health check for the SSH endpoint name: healthy when its shared connection
(ISshConnectionProvider) is up, or can be opened, and answers a ping.
public static IHealthChecksBuilder AddSsh(this IHealthChecksBuilder builder, string name, string? checkName = null, HealthStatus? failureStatus = null, IEnumerable<string>? tags = null, TimeSpan? timeout = null)
Parameters
builderIHealthChecksBuilderThe health checks builder.
namestringThe endpoint, as registered with
AddSshClient.checkNamestringThe check's name (default
ssh-and the endpoint's name).failureStatusHealthStatus?The status reported when the check fails (default Unhealthy).
tagsIEnumerable<string>Tags to filter checks by.
timeoutTimeSpan?How long the check may take (default: the health check service's).