2014-02-26 05:40:47 +00:00
|
|
|
|
using System;
|
|
|
|
|
using NzbDrone.Core.Datastore;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.HealthCheck
|
|
|
|
|
{
|
|
|
|
|
public class HealthCheck : ModelBase
|
|
|
|
|
{
|
2014-04-10 00:15:13 +00:00
|
|
|
|
public Type Source { get; set; }
|
|
|
|
|
public HealthCheckResult Type { get; set; }
|
2014-02-26 05:40:47 +00:00
|
|
|
|
public String Message { get; set; }
|
|
|
|
|
|
2014-04-10 00:15:13 +00:00
|
|
|
|
public HealthCheck(Type source)
|
2014-02-26 05:40:47 +00:00
|
|
|
|
{
|
2014-04-10 00:15:13 +00:00
|
|
|
|
Source = source;
|
|
|
|
|
Type = HealthCheckResult.Ok;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public HealthCheck(Type source, HealthCheckResult type, string message)
|
|
|
|
|
{
|
|
|
|
|
Source = source;
|
2014-02-26 05:40:47 +00:00
|
|
|
|
Type = type;
|
|
|
|
|
Message = message;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-10 00:15:13 +00:00
|
|
|
|
public enum HealthCheckResult
|
2014-02-26 05:40:47 +00:00
|
|
|
|
{
|
2014-04-10 00:15:13 +00:00
|
|
|
|
Ok = 0,
|
2014-02-26 05:40:47 +00:00
|
|
|
|
Warning = 1,
|
|
|
|
|
Error = 2
|
|
|
|
|
}
|
|
|
|
|
}
|