File: ISystemdNotifier.cs
Web Access
Project: src\src\libraries\Microsoft.Extensions.Hosting.Systemd\src\Microsoft.Extensions.Hosting.Systemd.csproj (Microsoft.Extensions.Hosting.Systemd)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
namespace Microsoft.Extensions.Hosting.Systemd
{
    /// <summary>
    /// Provides support to notify systemd about the service status.
    /// </summary>
    public interface ISystemdNotifier
    {
        /// <summary>
        /// Sends a notification to systemd.
        /// </summary>
        /// <param name="state">The <see cref="ServiceState"/> to notify.</param>
        void Notify(ServiceState state);
        /// <summary>
        /// Returns whether systemd is configured to receive service notifications.
        /// </summary>
        bool IsEnabled { get; }
    }
}