mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:37:01 +00:00
Allow runner to check service connection in background. (#3542)
* Allow runner to check service connection in background. * . * .
This commit is contained in:
42
src/Sdk/DTWebApi/WebApi/ServiceConnectivityCheck.cs
Normal file
42
src/Sdk/DTWebApi/WebApi/ServiceConnectivityCheck.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class ServiceConnectivityCheckInput
|
||||
{
|
||||
[JsonConstructor]
|
||||
public ServiceConnectivityCheckInput()
|
||||
{
|
||||
Endpoints = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public Dictionary<string, string> Endpoints { get; set; }
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public int IntervalInSecond { get; set; }
|
||||
|
||||
[DataMember(EmitDefaultValue = false)]
|
||||
public int RequestTimeoutInSecond { get; set; }
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
public class ServiceConnectivityCheckResult
|
||||
{
|
||||
[JsonConstructor]
|
||||
public ServiceConnectivityCheckResult()
|
||||
{
|
||||
EndpointsResult = new Dictionary<string, List<string>>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
[DataMember(Order = 1, EmitDefaultValue = true)]
|
||||
public bool HasFailure { get; set; }
|
||||
|
||||
[DataMember(Order = 2, EmitDefaultValue = false)]
|
||||
public Dictionary<string, List<string>> EndpointsResult { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user