Skip to main content

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​
TypeNameDescription
System.Int32intervalIn 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​
TypeNameDescription
System.StringnameMetric name.
System.Func<System.Object>funcFunction 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​
TypeNameDescription
System.StringnameMetric name.
System.Func<System.Threading.Tasks.Task<System.Object>>funcFunction to calculate the metric value.