KestrunHost.AddProbe method (1 of 3)
Registers the provided IProbe instance with the host.
public KestrunHost AddProbe(IProbe probe)
| parameter | description |
|---|---|
| probe | The probe to register. |
Return Value
The current KestrunHost instance.
See Also
- interface IProbe
- class KestrunHost
- namespace Kestrun.Hosting
KestrunHost.AddProbe method (2 of 3)
Registers a delegate-based probe.
public KestrunHost AddProbe(string name, string[]? tags,
Func<CancellationToken, Task<ProbeResult>> callback)
| parameter | description |
|---|---|
| name | Probe name. |
| tags | Optional tag list used for filtering. |
| callback | Delegate executed when the probe runs. |
Return Value
The current KestrunHost instance.
See Also
- record ProbeResult
- class KestrunHost
- namespace Kestrun.Hosting
KestrunHost.AddProbe method (3 of 3)
Registers a script-based probe written in any supported language.
public KestrunHost AddProbe(string name, string[]? tags, string code,
ScriptLanguage? language = default, IReadOnlyDictionary<string, object?>? arguments = null,
string[]? extraImports = null, Assembly[]? extraRefs = null)
| parameter | description |
|---|---|
| name | Probe name. |
| tags | Optional tag list used for filtering. |
| code | Script contents. |
| language | Optional language override. When null, Health defaults are used. |
| arguments | Optional argument dictionary exposed to the script. |
| extraImports | Optional language-specific imports. |
| extraRefs | Optional additional assembly references. |
Return Value
The current KestrunHost instance.
See Also
- enum ScriptLanguage
- class KestrunHost
- namespace Kestrun.Hosting