aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Telemetry/ITelemetryDestination.cs
blob: aec3d164a12c542992161021a9c83fa80d2a4d74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Telemetry
{
    /// <summary>
    /// Represents a target destination that can receive and process published telemetry data.
    /// Implementations may include cloud services, databases, or custom sinks.
    /// </summary>
    public interface ITelemetryDestination : IDisposable
    {
        /// <summary>
        /// Gets or sets the unique name of the destination used for identification and logging.
        /// </summary>
        String Name { get; set; }

        /// <summary>
        /// Checks whether the destination is currently available to receive telemetry.
        /// </summary>
        /// <returns>True if the destination is available; otherwise, false.</returns>
        Task<bool> IsAvailable();

        /// <summary>
        /// Gets a read-only list of source types that this destination supports.
        /// </summary>
        IReadOnlyList<TelemetrySourceTypes> SupportedSourceTypes { get; }

        /// <summary>
        /// Publishes the given telemetry package along with machine metadata properties.
        /// </summary>
        /// <param name="package">The telemetry package to publish.</param>
        /// <param name="properties">Metadata properties such as SerialNumber, MachineType, and Environment.</param>
        Task Publish(TelemetryPublishPackage package, List<KeyValuePair<String, String>> properties);
    }
}