Interface IHealthReporter
Logic responsible for reporting device health metrics to Meadow.Cloud.
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IHealthReporter
Methods
Start(int)
Starts the health reporter based on the desired interval.
View Source
Declaration
Task Start(int interval)
Returns
System.Threading.Tasks.Task
Parameters
| Type | Name | Description | 
|---|---|---|
System.Int32 | interval | In minutes | 
Send()
Can be called to manually send a health report event.
View Source
Declaration
Task Send()
Returns
System.Threading.Tasks.Task
AddMetric(string, Func<object>)
Add a custom health metric.
View Source
Declaration
bool AddMetric(string name, Func<object> func)
Returns
System.Boolean
Parameters
| Type | Name | Description | 
|---|---|---|
System.String | name | Metric name. | 
System.Func<System.Object> | func | Function to calculate metric value. | 
AddMetric(string, Func<Task<object>>)
Add a custom health metric.
View Source
Declaration
bool AddMetric(string name, Func<Task<object>> func)
Returns
System.Boolean
Parameters
| Type | Name | Description | 
|---|---|---|
System.String | name | Metric name. | 
System.Func<System.Threading.Tasks.Task<System.Object>> | func | Function to calculate the metric value. |