Releases: smdn/Smdn.Net.MuninNode
Releases · smdn/Smdn.Net.MuninNode
Smdn.Net.MuninNode.Hosting version 3.2.0
Immutable
release. Only release title and notes can be modified.
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-12-22 update assembly version
- 2025-12-22 add target framework net10.0
- 2025-07-08 remove redundant properties that have the same as default values
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net10.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net10.0.apilist.cs
new file mode 100644
index 0000000..6dc1f88
--- /dev/null
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net10.0.apilist.cs
@@ -0,0 +1,54 @@
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.2.0)
+// Name: Smdn.Net.MuninNode.Hosting
+// AssemblyVersion: 3.2.0.0
+// InformationalVersion: 3.2.0+e0dd656596dd5517e6360ee27212b5a87aa0228c
+// TargetFramework: .NETCoreApp,Version=v10.0
+// Configuration: Release
+// Metadata: IsTrimmable=True
+// Metadata: RepositoryUrl=https://github.com/smdn/Smdn.Net.MuninNode
+// Metadata: RepositoryBranch=main
+// Metadata: RepositoryCommit=e0dd656596dd5517e6360ee27212b5a87aa0228c
+// Referenced assemblies:
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Smdn.Net.MuninNode, Version=2.5.0.0, Culture=neutral
+// System.Net.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+#nullable enable annotations
+
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Smdn.Net.MuninNode;
+using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Hosting;
+
+namespace Smdn.Net.MuninNode.Hosting {
+ public static class IServiceCollectionExtensions {
+ public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNode, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNode : class, IMuninNode where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeBuilder>(this IServiceCollection services, Func<IMuninServiceBuilder, TMuninNodeBuilder> buildMunin) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeService, TMuninNodeImplementation, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeService : class, IMuninNode where TMuninNodeImplementation : class, TMuninNodeService where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
+ }
+
+ public class MuninNodeBackgroundService : BackgroundService {
+ public MuninNodeBackgroundService(IMuninNode node) {}
+ public MuninNodeBackgroundService(IMuninNode node, ILogger<MuninNodeBackgroundService>? logger) {}
+
+ public EndPoint EndPoint { get; }
+ protected ILogger? Logger { get; }
+
+ public override void Dispose() {}
+ protected override async Task ExecuteAsync(CancellationToken stoppingToken) {}
+ public override async Task StartAsync(CancellationToken cancellationToken) {}
+ public override async Task StopAsync(CancellationToken cancellationToken) {}
+ }
+}
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.7.1.0.
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.5.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
index afda8dd..974b83f 100644
--- a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
@@ -1,50 +1,54 @@
-// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.1.0)
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.2.0)
// Name: Smdn.Net.MuninNode.Hosting
-// AssemblyVersion: 3.1.0.0
-// InformationalVersion: 3.1.0+d9b937573b3b1dd41eaf878498bcf5d285c10471
+// AssemblyVersion: 3.2.0.0
+// InformationalVersion: 3.2.0+e0dd656596dd5517e6360ee27212b5a87aa0228c
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
+// Metadata: IsTrimmable=True
+// Metadata: RepositoryUrl=https://github.com/smdn/Smdn.Net.MuninNode
+// Metadata: RepositoryBranch=main
+// Metadata: RepositoryCommit=e0dd656596dd5517e6360ee27212b5a87aa0228c
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Smdn.Net.MuninNode, Version=2.5.0.0, Culture=neutral
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
using Smdn.Net.MuninNode.Hosting;
namespace Smdn.Net.MuninNode.Hosting {
public static class IServiceCollectionExtensions {
public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNode, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNode : class, IMuninNode where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeBuilder>(this IServiceCollection services, Func<IMuninServiceBuilder, TMuninNodeBuilder> buildMunin) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeBuilder : MuninNodeBuilder {}
public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeService, TMuninNodeImplementation, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeService : class, IMuninNode where TMuninNodeImplementation : class, TMuninNodeService where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
}
public class MuninNodeBackgroundService : BackgroundService {
public MuninNodeBackgroundService(IMuninNode node) {}
public MuninNodeBackgroundService(IMuninNode node, ILogger<MuninNodeBackgroundService>? logger) {}
public EndPoint EndPoint { get; }
protected ILogger? ...Smdn.Net.MuninNode version 2.6.0
Immutable
release. Only release title and notes can be modified.
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-12-22 update assembly version
- 2025-12-22 fix minor warnings
- 2025-12-22 simplify property implementation
- 2025-12-22 use partial property for GeneratedRegexAttribute
- 2025-12-22 add target framework net10.0
- 2025-12-22 add support for configuring 'graph_data_size'
- 2025-12-22 fix message string for ObsoleteAttribute
- 2025-07-14 use OfType() instead of 'is'
- 2025-07-14 improve <summary>
- 2025-07-11 add UseTransactionCallback and mark UseSessionCallback obsolete
- 2025-07-11 mark INodeSessionCallback obsolete
- 2025-07-11 introduce ITransactionCallback
- 2025-07-08 remove redundant properties that have the same as default values
- 2025-07-07 fix or suppress warnings
- 2025-06-28 remove unnecessary accessibility modifiers
- 2025-06-16 fix warning CA2263
- 2025-06-06 fix typo and replace to more better word
- 2025-06-06 add xml comment docs
- 2025-06-01 override ToString() in the implementation classes of IAccessRule
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net10.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net10.0.apilist.cs
new file mode 100644
index 0000000..827fad2
--- /dev/null
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net10.0.apilist.cs
@@ -0,0 +1,582 @@
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.6.0)
+// Name: Smdn.Net.MuninNode
+// AssemblyVersion: 2.6.0.0
+// InformationalVersion: 2.6.0+e0dd656596dd5517e6360ee27212b5a87aa0228c
+// TargetFramework: .NETCoreApp,Version=v10.0
+// Configuration: Release
+// Metadata: IsTrimmable=True
+// Metadata: RepositoryUrl=https://github.com/smdn/Smdn.Net.MuninNode
+// Metadata: RepositoryBranch=main
+// Metadata: RepositoryCommit=e0dd656596dd5517e6360ee27212b5a87aa0228c
+// Referenced assemblies:
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// System.Collections, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Collections.Concurrent, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.ComponentModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
+// System.Linq, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Memory, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
+// System.Net.Primitives, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Net.Sockets, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Security.Cryptography, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Text.RegularExpressions, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Threading, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+#nullable enable annotations
+
+using System;
+using System.Buffers;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Smdn.Net.MuninNode;
+using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Protocol;
+using Smdn.Net.MuninNode.Transport;
+using Smdn.Net.MuninPlugin;
+
+namespace Smdn.Net.MuninNode {
+ public interface IAccessRule {
+ bool IsAcceptable(IPEndPoint remoteEndPoint);
+ }
+
+ public interface IMuninNode {
+ EndPoint EndPoint { get; }
+ string HostName { get; }
+
+ Task RunAsync(CancellationToken cancellationToken);
+ }
+
+ public static class IAccessRuleServiceCollectionExtensions {
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom, bool shouldConsiderIPv4MappedIPv6Address) {}
+ public static IServiceCollection AddMuninNodeLoopbackOnlyAccessRule(this IServiceCollection services) {}
+ }
+
+ public abstract class LocalNode : NodeBase {
+ public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
+ public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
+
+ [Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
+ protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
+ protected LocalNode(IMuninNodeListenerFactory? listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
+
+ [Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
+ protected override Socket CreateServerSocket() {}
+ }
+
+ public class MuninNodeOptions {
+ public const string DefaultHostName = "munin-node.localhost";
+ public const int DefaultPort = 4949;
+
+ public static IPAddress DefaultAddress { get; }
+
+ public MuninNodeOptions() {}
+
+ public IAccessRule? AccessRule { get; set; }
+ public IPAddress Address { get; set; }
+ public string HostName { get; set; }
+ public int Port { get; set; }
+
+ public MuninNodeOptions AllowFrom(IReadOnlyList<IPAddress> addresses, bool shouldConsiderIPv4MappedIPv6Address = true) {}
+ public MuninNodeOptions AllowFromLoopbackOnly() {}
+ internal protected virtual void Configure(MuninNodeOptions baseOptions) {}
+ public MuninNodeOptions UseAnyAddress() {}
+ public MuninNodeOptions UseAnyAddress(int port) {}
+ public MuninNodeOptions UseLoopbackAddress() {}
+ public MuninNodeOptions UseLoopbackAddress(int port) {}
+ }
+
+ public abstract class NodeBase :
+ IAsyncDisposable,
+ IDisposable,
+ IMuninNode,
+ IMuninNodeProfile
+ {
+ [Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
+ protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
+ protected NodeBase(IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
+ protected NodeBase(IMuninProtocolHandlerFactory protocolHandlerFactory, IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
+
+ public virtual Encoding Encoding { get; }
+ public EndPoint EndPoint { get; }
+ public abstract string HostName { get; }
+ protected IMuninNodeListener? Listener { get; }
+ [Obsolete("Use EndPoint instead.")]
+ public EndPoint LocalEndPoint { get; }
+ protected ILogger? Logger { get; }
+ public virtual Version NodeVersion { get; }
+ public abstract IPluginProvider PluginProvider { get; }
+ string IMuninNodeProfile.Version { get; }
+
+ public async ValueTask AcceptAsync(bool throwIfCancellationRequested, CancellationToken cancellationToken) {}
+ public async ValueTask AcceptSingleSes...Smdn.Net.MuninNode.Hosting version 3.1.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-06-01 update assembly version
- 2025-05-31 add support for registering custom MuninNodeBackgroundService type
- 2025-05-31 mark IMuninNodeBuilder obsolete
- 2025-05-28 override BackgroundService.StartAsync to add logging
- 2025-05-28 expose ILogger
- 2025-05-28 improve logging using with LoggerMessage
- 2025-05-28 add support for graceful shutdown
- 2025-05-01 enable package validation
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
index 387ee95..4d934a8 100644
--- a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
@@ -1,43 +1,50 @@
-// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.0.0)
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.1.0)
// Name: Smdn.Net.MuninNode.Hosting
-// AssemblyVersion: 3.0.0.0
-// InformationalVersion: 3.0.0+0830d2fdea4a5b05d99958b5116ff7b474590f2f
+// AssemblyVersion: 3.1.0.0
+// InformationalVersion: 3.1.0+d9b937573b3b1dd41eaf878498bcf5d285c10471
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
-// Smdn.Net.MuninNode, Version=2.2.0.0, Culture=neutral
+// Smdn.Net.MuninNode, Version=2.5.0.0, Culture=neutral
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
+using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
using Smdn.Net.MuninNode.Hosting;
namespace Smdn.Net.MuninNode.Hosting {
public static class IServiceCollectionExtensions {
public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNode, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNode : class, IMuninNode where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeBuilder>(this IServiceCollection services, Func<IMuninServiceBuilder, TMuninNodeBuilder> buildMunin) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TMuninNodeBackgroundService, TMuninNodeService, TMuninNodeImplementation, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeService : class, IMuninNode where TMuninNodeImplementation : class, TMuninNodeService where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
}
public class MuninNodeBackgroundService : BackgroundService {
public MuninNodeBackgroundService(IMuninNode node) {}
public MuninNodeBackgroundService(IMuninNode node, ILogger<MuninNodeBackgroundService>? logger) {}
public EndPoint EndPoint { get; }
+ protected ILogger? Logger { get; }
public override void Dispose() {}
protected override async Task ExecuteAsync(CancellationToken stoppingToken) {}
+ public override async Task StartAsync(CancellationToken cancellationToken) {}
+ public override async Task StopAsync(CancellationToken cancellationToken) {}
}
}
// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.5.0.0.
// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs
index 3162c84..a325383 100644
--- a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs
@@ -1,42 +1,48 @@
-// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.0.0)
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.1.0)
// Name: Smdn.Net.MuninNode.Hosting
-// AssemblyVersion: 3.0.0.0
-// InformationalVersion: 3.0.0+0830d2fdea4a5b05d99958b5116ff7b474590f2f
+// AssemblyVersion: 3.1.0.0
+// InformationalVersion: 3.1.0+d9b937573b3b1dd41eaf878498bcf5d285c10471
// TargetFramework: .NETStandard,Version=v2.1
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
-// Smdn.Net.MuninNode, Version=2.2.0.0, Culture=neutral
+// Smdn.Net.MuninNode, Version=2.5.0.0, Culture=neutral
// netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
#nullable enable annotations
using System;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
using Smdn.Net.MuninNode.Hosting;
namespace Smdn.Net.MuninNode.Hosting {
public static class IServiceCollectionExtensions {
public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
+ public static IServiceCollection AddHostedMuninNodeService<TMuninNodeBackgroundService, TMuninNode, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNode : class, IMuninNode where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<TMuninNodeBackgroundService, TMuninNodeBuilder>(this IServiceCollection services, Func<IMuninServiceBuilder, TMuninNodeBuilder> buildMunin) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeBuilder : MuninNodeBuilder {}
+ public static IServiceCollection AddHostedMuninNodeService<TMuninNodeBackgroundService, TMuninNodeService, TMuninNodeImplementation, TMuninNodeOptions, TMuninNodeBuilder>(this IServiceCollection services, Action<TMuninNodeOptions> configureNode, Func<IMuninServiceBuilder, string, TMuninNodeBuilder> createNodeBuilder, Action<TMuninNodeBuilder> buildNode) where TMuninNodeBackgroundService : MuninNodeBackgroundService where TMuninNodeService : class, IMuninNode where TMuninNodeImplementation : class, TMuninNodeService where TMuninNodeOptions : MuninNodeOptions, new() where TMuninNodeBuilder : MuninNodeBuilder {}
}
public c...Smdn.Net.MuninNode version 2.5.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-06-01 update assembly version
- 2025-05-31 mark IMuninNodeBuilder obsolete
- 2025-05-31 add support for specifying the service type and implementation type of registering nodes
- 2025-05-29 add support for building with custom MuninNodeBuilder types
- 2025-05-29 add support for configuring with custom MuninNodeOptions types
- 2025-05-29 expose MuninNodeBuilder
- 2025-05-29 add PluginGraphAttributesBuilder.WithTitle() to be able to overwrite graph_title
- 2025-05-26 add Starting/Started/Stopping/Stopped async methods
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
index 3caafc0..a379024 100644
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
@@ -1,509 +1,546 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.4.0)
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.5.0)
// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 2.4.0.0
-// InformationalVersion: 2.4.0+6578cec572157dafbc9518cc746aae28f7f1ce6d
+// AssemblyVersion: 2.5.0.0
+// InformationalVersion: 2.5.0+41ff114bf69b864033a05a389896010d3eefe4d5
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Linq, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.RegularExpressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Threading, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
using Smdn.Net.MuninNode.Protocol;
using Smdn.Net.MuninNode.Transport;
using Smdn.Net.MuninPlugin;
namespace Smdn.Net.MuninNode {
public interface IAccessRule {
bool IsAcceptable(IPEndPoint remoteEndPoint);
}
public interface IMuninNode {
EndPoint EndPoint { get; }
string HostName { get; }
Task RunAsync(CancellationToken cancellationToken);
}
public static class IAccessRuleServiceCollectionExtensions {
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom, bool shouldConsiderIPv4MappedIPv6Address) {}
public static IServiceCollection AddMuninNodeLoopbackOnlyAccessRule(this IServiceCollection services) {}
}
public abstract class LocalNode : NodeBase {
public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
protected LocalNode(IMuninNodeListenerFactory? listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
[Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected override Socket CreateServerSocket() {}
}
- public sealed class MuninNodeOptions {
+ public class MuninNodeOptions {
public const string DefaultHostName = "munin-node.localhost";
public const int DefaultPort = 4949;
public static IPAddress DefaultAddress { get; }
public MuninNodeOptions() {}
public IAccessRule? AccessRule { get; set; }
public IPAddress Address { get; set; }
public string HostName { get; set; }
public int Port { get; set; }
public MuninNodeOptions AllowFrom(IReadOnlyList<IPAddress> addresses, bool shouldConsiderIPv4MappedIPv6Address = true) {}
public MuninNodeOptions AllowFromLoopbackOnly() {}
+ internal protected virtual void Configure(MuninNodeOptions baseOptions) {}
public MuninNodeOptions UseAnyAddress() {}
public MuninNodeOptions UseAnyAddress(int port) {}
public MuninNodeOptions UseLoopbackAddress() {}
public MuninNodeOptions UseLoopbackAddress(int port) {}
}
public abstract class NodeBase :
IAsyncDisposable,
IDisposable,
IMuninNode,
IMuninNodeProfile
{
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
protected NodeBase(IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
protected NodeBase(IMuninProtocolHandlerFactory protocolHandlerFactory, IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
public virtual Encoding Encoding { get; }
public EndPoint EndPoint { get; }
public abstract string HostName { get; }
protected IMuninNodeListener? Listener { get; }
[Obsolete("Use EndPoint instead.")]
public EndPoint LocalEndPoint { get; }
protected ILogger? Logger { get; }
public virtual Version NodeVersion { get; }
public abstract IPluginProvider PluginProvider { get; }
string IMuninNodeProfile.Version { get; }
public async ValueTask AcceptAsync(bool throwIfCancellationRequested, CancellationToken cancellationToken) {}
public async ValueTask AcceptSingleSessionAsync(CancellationToken cancellationToken = default) {}
[Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected virtual Socket CreateServerSocket() {}
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public async ValueTask DisposeAsync() {}
protected virtual async ValueTask DisposeAsyncCore() {}
protected virtual EndPoint GetLocalEndPointToBind() {}
protected virtual IMuninNodeProfile GetNodeProfile() {}
public Task RunAsync(CancellationToken cancellationToken) {}
[Obsolete("This method will be deprecated in the future.Use IMuninNodeListenerFactory and StartAsync instead.Make sure to override CreateServerSocket if you need to use this method.")]
public void Start() {}
public ValueTask StartAsync(CancellationToken cancellationToken = default) {}
+ protected virtual ValueTask StartedAsync(CancellationToken cancellationToken) {}
+ protected virtual ValueTask StartingAsync(CancellationToken cancellationToken) {}
public ValueTask StopAsync(CancellationToken cancellationToken = default) {}
+ protected virtual ValueTask StoppedAsync(CancellationToken cancellationToken) {}
+ protected virtual ValueTask StoppingAsync(CancellationToken cancellationToken) {}
protected void ThrowIfDisposed() {}
protected void ThrowIfPluginProviderIsNull() {}
}
}
namespace Smdn.Net.MuninNode.DependencyInjection {
+ [Obs...Smdn.Net.MuninNode version 2.4.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-05-24 make CancellationToken optional
- 2025-05-24 update assembly version
- 2025-05-24 fix typos
- 2025-05-24 refactor implementation of responding as 'Unknown service'
- 2025-05-24 use StringBuilder to build responses instead of List<string>
- 2025-05-24 add MultigraphPlugin
- 2025-05-24 add support for 'multigraph' protocol extension
- 2025-05-22 add StopAsync()
- 2025-05-22 improve handing of negative fields
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
index d6b659a..3caafc0 100644
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
@@ -1,492 +1,509 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.3.0)
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.4.0)
// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 2.3.0.0
-// InformationalVersion: 2.3.0+805f911ac4e163898a8e18be3121fd9baf3a44f5
+// AssemblyVersion: 2.4.0.0
+// InformationalVersion: 2.4.0+6578cec572157dafbc9518cc746aae28f7f1ce6d
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Collections.Concurrent, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Linq, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.RegularExpressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Threading, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
using Smdn.Net.MuninNode.Protocol;
using Smdn.Net.MuninNode.Transport;
using Smdn.Net.MuninPlugin;
namespace Smdn.Net.MuninNode {
public interface IAccessRule {
bool IsAcceptable(IPEndPoint remoteEndPoint);
}
public interface IMuninNode {
EndPoint EndPoint { get; }
string HostName { get; }
Task RunAsync(CancellationToken cancellationToken);
}
public static class IAccessRuleServiceCollectionExtensions {
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom, bool shouldConsiderIPv4MappedIPv6Address) {}
public static IServiceCollection AddMuninNodeLoopbackOnlyAccessRule(this IServiceCollection services) {}
}
public abstract class LocalNode : NodeBase {
public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
protected LocalNode(IMuninNodeListenerFactory? listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
[Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected override Socket CreateServerSocket() {}
}
public sealed class MuninNodeOptions {
public const string DefaultHostName = "munin-node.localhost";
public const int DefaultPort = 4949;
public static IPAddress DefaultAddress { get; }
public MuninNodeOptions() {}
public IAccessRule? AccessRule { get; set; }
public IPAddress Address { get; set; }
public string HostName { get; set; }
public int Port { get; set; }
public MuninNodeOptions AllowFrom(IReadOnlyList<IPAddress> addresses, bool shouldConsiderIPv4MappedIPv6Address = true) {}
public MuninNodeOptions AllowFromLoopbackOnly() {}
public MuninNodeOptions UseAnyAddress() {}
public MuninNodeOptions UseAnyAddress(int port) {}
public MuninNodeOptions UseLoopbackAddress() {}
public MuninNodeOptions UseLoopbackAddress(int port) {}
}
public abstract class NodeBase :
IAsyncDisposable,
IDisposable,
IMuninNode,
IMuninNodeProfile
{
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
protected NodeBase(IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
protected NodeBase(IMuninProtocolHandlerFactory protocolHandlerFactory, IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
public virtual Encoding Encoding { get; }
public EndPoint EndPoint { get; }
public abstract string HostName { get; }
protected IMuninNodeListener? Listener { get; }
[Obsolete("Use EndPoint instead.")]
public EndPoint LocalEndPoint { get; }
protected ILogger? Logger { get; }
public virtual Version NodeVersion { get; }
public abstract IPluginProvider PluginProvider { get; }
string IMuninNodeProfile.Version { get; }
public async ValueTask AcceptAsync(bool throwIfCancellationRequested, CancellationToken cancellationToken) {}
public async ValueTask AcceptSingleSessionAsync(CancellationToken cancellationToken = default) {}
[Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected virtual Socket CreateServerSocket() {}
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public async ValueTask DisposeAsync() {}
protected virtual async ValueTask DisposeAsyncCore() {}
protected virtual EndPoint GetLocalEndPointToBind() {}
protected virtual IMuninNodeProfile GetNodeProfile() {}
public Task RunAsync(CancellationToken cancellationToken) {}
[Obsolete("This method will be deprecated in the future.Use IMuninNodeListenerFactory and StartAsync instead.Make sure to override CreateServerSocket if you need to use this method.")]
public void Start() {}
public ValueTask StartAsync(CancellationToken cancellationToken = default) {}
+ public ValueTask StopAsync(CancellationToken cancellationToken = default) {}
protected void ThrowIfDisposed() {}
protected void ThrowIfPluginProviderIsNull() {}
}
}
namespace Smdn.Net.MuninNode.DependencyInjection {
public interface IMuninNodeBuilder {
string ServiceKey { get; }
IServiceCollection Services { get; }
IMuninNode Build(IServiceProvider serviceProvider);
}
public interface IMuninServiceBuilder {
IServiceCollection Services { get; }
}
public static class IMuninNodeBuilderExtensions {
public static IMuninNodeBuilder AddPlugin(this IMuninNodeBuilder builder, Func<IServiceProvider, IPlugin> buildPlugin) {}
...Smdn.Net.MuninNode version 2.3.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-05-18 improve PluginFactory.CreatePlugin to be able to accept IPluginGraphAttributes instead of PluginGraphAttributes
- 2025-05-18 improve xml comment docs
- 2025-05-18 make WellKnownCategory.Other default value
- 2025-05-18 update assembly version
- 2025-05-18 add PluginGraphAttributesBuilder.WithCategory(WellKnownCategory)
- 2025-05-18 add WellKnownCategory
- 2025-05-18 add PluginGraphAttributesBuilder
- 2025-05-17 handle ObjectDisposedException thrown from IMuninNodeClient.ReceiveAsync
- 2025-05-17 fix typo
- 2025-05-15 add support for 'dirtyconfig' protocol extension
- 2025-05-08 introduce object pool for writing reponse lines
- 2025-05-08 refactor writing fetch and config response
- 2025-05-06 fix race condition during response in protocol handler
- 2025-05-06 seal non-public class
- 2025-05-05 suppress warning CS8602
- 2025-05-05 add extension points
- 2025-05-05 introduce abstraction APIs for handling munin protocol
- 2025-05-05 reduce conversion of argument 'query-item' of fetch/config command into string
- 2025-05-05 split NodeBase implementation into separate files
- 2025-05-04 simplify TryReadLine
- 2025-05-04 use 'is' type cast instead of 'is not null'
- 2025-05-03 improve handling of newline characters of the command line
- 2025-05-03 add comments
- 2025-05-02 reduce dependency of Smdn.Fundamental.Exception
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
index b0e6eda..d6b659a 100644
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
@@ -1,352 +1,492 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.2.0)
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.3.0)
// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 2.2.0.0
-// InformationalVersion: 2.2.0+04e5ff38096e4d62b2c9bc5a716d8b2c5a6ad72d
+// AssemblyVersion: 2.3.0.0
+// InformationalVersion: 2.3.0+805f911ac4e163898a8e18be3121fd9baf3a44f5
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
-// Smdn.Fundamental.Exception, Version=3.0.0.0, Culture=neutral
// System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Collections.Concurrent, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Linq, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.RegularExpressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Net.Sockets;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Protocol;
using Smdn.Net.MuninNode.Transport;
using Smdn.Net.MuninPlugin;
namespace Smdn.Net.MuninNode {
public interface IAccessRule {
bool IsAcceptable(IPEndPoint remoteEndPoint);
}
public interface IMuninNode {
EndPoint EndPoint { get; }
string HostName { get; }
Task RunAsync(CancellationToken cancellationToken);
}
public static class IAccessRuleServiceCollectionExtensions {
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom, bool shouldConsiderIPv4MappedIPv6Address) {}
public static IServiceCollection AddMuninNodeLoopbackOnlyAccessRule(this IServiceCollection services) {}
}
public abstract class LocalNode : NodeBase {
public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
protected LocalNode(IMuninNodeListenerFactory? listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
[Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected override Socket CreateServerSocket() {}
}
public sealed class MuninNodeOptions {
public const string DefaultHostName = "munin-node.localhost";
public const int DefaultPort = 4949;
public static IPAddress DefaultAddress { get; }
public MuninNodeOptions() {}
public IAccessRule? AccessRule { get; set; }
public IPAddress Address { get; set; }
public string HostName { get; set; }
public int Port { get; set; }
public MuninNodeOptions AllowFrom(IReadOnlyList<IPAddress> addresses, bool shouldConsiderIPv4MappedIPv6Address = true) {}
public MuninNodeOptions AllowFromLoopbackOnly() {}
public MuninNodeOptions UseAnyAddress() {}
public MuninNodeOptions UseAnyAddress(int port) {}
public MuninNodeOptions UseLoopbackAddress() {}
public MuninNodeOptions UseLoopbackAddress(int port) {}
}
public abstract class NodeBase :
IAsyncDisposable,
IDisposable,
- IMuninNode
+ IMuninNode,
+ IMuninNodeProfile
{
[Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
protected NodeBase(IMuninNodeListenerFactory listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
+ prote...Smdn.Net.MuninNode.Hosting version 3.0.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
new file mode 100644
index 0000000..387ee95
--- /dev/null
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-net8.0.apilist.cs
@@ -0,0 +1,43 @@
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.0.0)
+// Name: Smdn.Net.MuninNode.Hosting
+// AssemblyVersion: 3.0.0.0
+// InformationalVersion: 3.0.0+0830d2fdea4a5b05d99958b5116ff7b474590f2f
+// TargetFramework: .NETCoreApp,Version=v8.0
+// Configuration: Release
+// Referenced assemblies:
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Smdn.Net.MuninNode, Version=2.2.0.0, Culture=neutral
+// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+#nullable enable annotations
+
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Smdn.Net.MuninNode;
+using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Hosting;
+
+namespace Smdn.Net.MuninNode.Hosting {
+ public static class IServiceCollectionExtensions {
+ public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
+ }
+
+ public class MuninNodeBackgroundService : BackgroundService {
+ public MuninNodeBackgroundService(IMuninNode node) {}
+ public MuninNodeBackgroundService(IMuninNode node, ILogger<MuninNodeBackgroundService>? logger) {}
+
+ public EndPoint EndPoint { get; }
+
+ public override void Dispose() {}
+ protected override async Task ExecuteAsync(CancellationToken stoppingToken) {}
+ }
+}
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.5.0.0.
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)
diff --git a/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs
new file mode 100644
index 0000000..3162c84
--- /dev/null
+++ b/doc/api-list/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting-netstandard2.1.apilist.cs
@@ -0,0 +1,42 @@
+// Smdn.Net.MuninNode.Hosting.dll (Smdn.Net.MuninNode.Hosting-3.0.0)
+// Name: Smdn.Net.MuninNode.Hosting
+// AssemblyVersion: 3.0.0.0
+// InformationalVersion: 3.0.0+0830d2fdea4a5b05d99958b5116ff7b474590f2f
+// TargetFramework: .NETStandard,Version=v2.1
+// Configuration: Release
+// Referenced assemblies:
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Hosting.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Smdn.Net.MuninNode, Version=2.2.0.0, Culture=neutral
+// netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
+#nullable enable annotations
+
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Smdn.Net.MuninNode;
+using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Hosting;
+
+namespace Smdn.Net.MuninNode.Hosting {
+ public static class IServiceCollectionExtensions {
+ public static IServiceCollection AddHostedMuninNodeService(this IServiceCollection services, Action<MuninNodeOptions> configureNode, Action<IMuninNodeBuilder> buildNode) {}
+ }
+
+ public class MuninNodeBackgroundService : BackgroundService {
+ public MuninNodeBackgroundService(IMuninNode node) {}
+ public MuninNodeBackgroundService(IMuninNode node, ILogger<MuninNodeBackgroundService>? logger) {}
+
+ public EndPoint EndPoint { get; }
+
+ public override void Dispose() {}
+ protected override async Task ExecuteAsync(CancellationToken stoppingToken) {}
+ }
+}
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.5.0.0.
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.1.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating)Full changes
Full changes in this release:
diff --git a/src/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting.csproj b/src/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting.csproj
new file mode 100644
index 0000000..f3af407
--- /dev/null
+++ b/src/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting.csproj
@@ -0,0 +1,65 @@
+<!--
+SPDX-FileCopyrightText: 2025 smdn <smdn@smdn.jp>
+SPDX-License-Identifier: MIT
+-->
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
+ <VersionPrefix>3.0.0</VersionPrefix>
+ <VersionSuffix></VersionSuffix>
+ <!--<PackageValidationBaselineVersion>3.0.0</PackageValidationBaselineVersion>-->
+ <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 -->
+ <Nullable>enable</Nullable>
+ <NoWarn>CS1591;$(NoWarn)</NoWarn> <!-- CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -->
+ </PropertyGroup>
+
+ <PropertyGroup Label="assembly attributes">
+ <Description>
+< for [.NET Generic Host](https://learn.microsoft.com/dotnet/core/extensions/generic-host).
+
+This library provides APIs to run Munin-Node as a background service running on a .NET Generic Host.
+
+This library mainly provides a `MuninNodeBackgroundService` class derived from `BackgroundService`, and extension methods to register the Munin-Node service to the `ServiceCollection`.
+
+This library uses [Smdn.Net.MuninNode](https://www.nuget.org/packages/Smdn.Net.MuninNode) and the API is provided as an extension to `Smdn.Net.MuninNode`.
+]]>
+ </Description>
+ <CopyrightYear>2025</CopyrightYear>
+ </PropertyGroup>
+
+ <PropertyGroup Label="package properties">
+ <PackageTags>Munin,Munin-Node,Munin-Plugin,hosting,generic-host,dependency-injection</PackageTags>
+ <GenerateNupkgReadmeFileDependsOnTargets>$(GenerateNupkgReadmeFileDependsOnTargets);GenerateReadmeFileContent</GenerateNupkgReadmeFileDependsOnTargets>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
+ <ProjectOrPackageReference ReferencePackageVersion="[2.2.0,4.0.0)" Include="..\Smdn.Net.MuninNode\Smdn.Net.MuninNode.csproj" />
+ </ItemGroup>
+
+ <Target Name="GenerateReadmeFileContent">
+ <PropertyGroup>
+ <PackageReadmeFileContent><) package and any other packages you need to the project file.
+
+```
+dotnet add package $(PackageId)
+dotnet add package Microsoft.Extensions.Hosting
+dotnet add package Microsoft.Extensions.Logging.Console
+```
+
+Using the API of the `Smdn.Net.MuninNode.DependencyInjection` and `Smdn.Net.MuninNode.Hosting` namespaces, and the `HostApplicationBuilder`, `WebApplicationBuilder` and so on, you can configure and run a Munin-Node as a hosted service in the following way.
+
+```cs
+$([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\..\examples\$(PackageId)\getting-started\Program.cs').TrimEnd())
+```
+
+## Contributing
+This project welcomes contributions, feedbacks and suggestions. You can contribute to this project by submitting [Issues]($(RepositoryUrl)/issues/new/choose) or [Pull Requests]($(RepositoryUrl)/pulls/) on the [GitHub repository]($(RepositoryUrl)).
+]]></PackageReadmeFileContent>
+ </PropertyGroup>
+ </Target>
+</Project>
diff --git a/src/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting/IServiceCollectionExtensions.cs b/src/Smdn.Net.MuninNode.Hosting/Smdn.Net.MuninNode.Hosting/IServiceCollectionExtensions.cs
new file mode 100644
index 0000000..4a3b85a
--- /dev/null
+++ b/src/Smdn.Net.M...Smdn.Net.MuninNode version 2.2.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-05-01 update assembly version
- 2025-05-01 improved logging using with LoggerMessage
- 2025-05-01 simplify logging using with logger scopes
- 2025-05-01 add getting-started examples that will be shown in README of NuGet packages
- 2025-04-27 rename ReadOnlyPluginProviderCollection to AggregatePluginProvider
- 2025-04-27 add new namspace 'Smdn.Net.MuninNode.DependencyInjection' to support building Munin-Node using the DI design pattern
- 2025-04-27 add IMuninNode.RunAsync
- 2025-04-27 add IMuninNode.EndPoint and mark NodeBase.LocalEndPoint obsolete
- 2025-04-27 add ReadOnlyPluginProviderCollection
- 2025-04-26 add default implementation for IMuninNodeListenerFactory
- 2025-04-25 use the term 'listener' instead of 'server', for objects that wait for connections from clients
- 2025-04-24 improve LocalNode to use the new APIs
- 2025-04-24 add NodeBase.StartAsync()
- 2025-04-24 reimplement transport layer using with the new abstraction interfaces
- 2025-04-24 mark NodeBase.Start() and CreateServerSocket() obsolete
- 2025-04-24 introduce transport layer abstraction interfaces into the namespace Smdn.Net.MuninNode.Transport
- 2025-04-24 introduce IMuninNode for future feature enhancements, abstracts the munin-node
- 2025-04-24 move LocalNode.GetLocalEndPointToBind() to base class
- 2025-04-21 fix typo in comment
- 2025-04-21 improve to disable re-start after disposing and properly throw ObjectDisposedException
- 2025-04-20 refactor implementation of AcceptSingleSessionAsync()
- 2025-04-20 use ArrayBufferWriter<T> for composing the response, to reduce allocation and calls
- 2025-04-18 add logging
- 2025-04-17 add IAccessRuleServiceCollectionExtensions.AddMuninNodeLoopbackOnlyAccessRule()
- 2025-04-17 move AddressListAccessRule to new namespace Smdn.Net.MuninNode.AccessRules
- 2025-04-17 use 'is null' instead of '== null'
- 2025-04-17 improve verification of IPv4-mapped IPv6 addresses
- 2025-04-17 add xml doc comments
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
index 51f7e32..b0e6eda 100644
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net8.0.apilist.cs
@@ -1,221 +1,352 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.1.0)
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.2.0)
// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 2.1.0.0
-// InformationalVersion: 2.1.0+16b4425cbed9d9331220cdef22e4c3e669122124
+// AssemblyVersion: 2.2.0.0
+// InformationalVersion: 2.2.0+04e5ff38096e4d62b2c9bc5a716d8b2c5a6ad72d
// TargetFramework: .NETCoreApp,Version=v8.0
// Configuration: Release
// Referenced assemblies:
-// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
+// Microsoft.Extensions.Options, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Smdn.Fundamental.Exception, Version=3.0.0.0, Culture=neutral
// System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Linq, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Sockets, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.RegularExpressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
+using System.Buffers;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
+using Smdn.Net.MuninNode.DependencyInjection;
+using Smdn.Net.MuninNode.Transport;
using Smdn.Net.MuninPlugin;
namespace Smdn.Net.MuninNode {
public interface IAccessRule {
bool IsAcceptable(IPEndPoint remoteEndPoint);
}
+ public interface IMuninNode {
+ EndPoint EndPoint { get; }
+ string HostName { get; }
+
+ Task RunAsync(CancellationToken cancellationToken);
+ }
+
public static class IAccessRuleServiceCollectionExtensions {
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom, bool shouldConsiderIPv4MappedIPv6Address) {}
+ public static IServiceCollection AddMuninNodeLoopbackOnlyAccessRule(this IServiceCollection services) {}
}
public abstract class LocalNode : NodeBase {
public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
+ [Obsolete("Use a constructor overload that takes IMuninNodeListenerFactory as an argument.")]
protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
+ protected LocalNode(IMuninNodeListenerFactory? listenerFactory, IAccessRule? accessRule, ILogger? logger) {}
+ [Obsolete("Use IMuninNodeListenerFactory and StartAsync instead.")]
protected override Socket CreateServerSocket() {}
- protected virtual EndPoint GetLocalEndPointToBind() {}
+ }
+
+ public sealed class MuninNodeOptions {
+ public const string DefaultHostName = "munin-node.localhost";
+ public const int DefaultPort = 4949;
+
+ public static IPAddress DefaultAddress { get; }
+
+ public MuninNodeOptions() {}
+
+ pu...Smdn.Net.MuninNode version 2.1.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2025-04-03 add CompatibilitySuppressions.xml
- 2025-04-03 update assembly version
- 2025-04-03 Merge branch 'main' into fix-decimal-point
- 2025-04-03 drop target framework net6.0
- 2025-04-03 fix to format field values with CultureInfo.InvariantCulture to use a format that is independent of the current locale
- 2024-11-03 update PackageValidationBaselineVersion
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs
deleted file mode 100644
index 62a4f2b..0000000
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.0.0)
-// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 2.0.0.0
-// InformationalVersion: 2.0.0+0c4121c0bc87932e6486c3b38a123cb59460ac02
-// TargetFramework: .NETCoreApp,Version=v6.0
-// Configuration: Release
-// Referenced assemblies:
-// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
-// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
-// Smdn.Fundamental.Exception, Version=3.0.0.0, Culture=neutral
-// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
-// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
-// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.Net.Sockets, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.Security.Cryptography.Algorithms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-// System.Text.RegularExpressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-#nullable enable annotations
-
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Sockets;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
-using Smdn.Net.MuninNode;
-using Smdn.Net.MuninPlugin;
-
-namespace Smdn.Net.MuninNode {
- public interface IAccessRule {
- bool IsAcceptable(IPEndPoint remoteEndPoint);
- }
-
- public static class IAccessRuleServiceCollectionExtensions {
- public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
- public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
- }
-
- public abstract class LocalNode : NodeBase {
- public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
- public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
-
- protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
-
- protected override Socket CreateServerSocket() {}
- protected virtual EndPoint GetLocalEndPointToBind() {}
- }
-
- public abstract class NodeBase :
- IAsyncDisposable,
- IDisposable
- {
- protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
-
- public virtual Encoding Encoding { get; }
- public abstract string HostName { get; }
- public EndPoint LocalEndPoint { get; }
- protected ILogger? Logger { get; }
- public virtual Version NodeVersion { get; }
- public abstract IPluginProvider PluginProvider { get; }
-
- public async ValueTask AcceptAsync(bool throwIfCancellationRequested, CancellationToken cancellationToken) {}
- public async ValueTask AcceptSingleSessionAsync(CancellationToken cancellationToken = default) {}
- protected abstract Socket CreateServerSocket();
- protected virtual void Dispose(bool disposing) {}
- public void Dispose() {}
- public async ValueTask DisposeAsync() {}
- protected virtual async ValueTask DisposeAsyncCore() {}
- public void Start() {}
- protected void ThrowIfPluginProviderIsNull() {}
- }
-}
-
-namespace Smdn.Net.MuninPlugin {
- public interface INodeSessionCallback {
- ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken);
- ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken);
- }
-
- public interface IPlugin {
- IPluginDataSource DataSource { get; }
- IPluginGraphAttributes GraphAttributes { get; }
- string Name { get; }
- INodeSessionCallback? SessionCallback { get; }
- }
-
- public interface IPluginDataSource {
- IReadOnlyCollection<IPluginField> Fields { get; }
- }
-
- public interface IPluginField {
- PluginFieldAttributes Attributes { get; }
- string Name { get; }
-
- ValueTask<string> GetFormattedValueStringAsync(CancellationToken cancellationToken);
- }
-
- public interface IPluginGraphAttributes {
- IEnumerable<string> EnumerateAttributes();
- }
-
- public interface IPluginProvider {
- IReadOnlyCollection<IPlugin> Plugins { get; }
- INodeSessionCallback? SessionCallback { get; }
- }
-
- public enum PluginFieldGraphStyle : int {
- Area = 1,
- AreaStack = 3,
- Default = 0,
- Line = 100,
- LineStack = 200,
- LineStackWidth1 = 201,
- LineStackWidth2 = 202,
- LineStackWidth3 = 203,
- LineWidth1 = 101,
- LineWidth2 = 102,
- LineWidth3 = 103,
- Stack = 2,
- }
-
- public class Plugin :
- INodeSessionCallback,
- IPlugin,
- IPluginDataSource
- {
- public Plugin(string name, PluginGraphAttributes graphAttributes, IReadOnlyCollection<IPluginField> fields) {}
-
- public IReadOnlyCollection<IPluginField> Fields { get; }
- public PluginGraphAttributes GraphAttributes { get; }
- public string Name { get; }
- IPluginDataSource IPlugin.DataSource { get; }
- IPluginGraphAttributes IPlugin.GraphAttributes { get; }
- INodeSessionCallback? IPlugin.SessionCallback { get; }
- IReadOnlyCollection<IPluginField> IPluginDataSource.Fields { get; }
-
- protected virtual ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken) {}
- protected virtual ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken) {}
- ValueTask INodeSessionCallback.ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken) {}
- ValueTask INodeSessionCallback.ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken) {}
- }
-
- public static class PluginFactory {
- public static IPluginField CreateField(string label, Func<double?> fetchValue) {}
- public static IPluginField CreateField(string label, PluginFieldGraphStyle graphStyle, Func<double?> fetchValue) {}
- public static IPluginField CreateField(string label, PluginFieldGraphStyle graphStyle, PluginFieldNormalValueRange normalRangeForWarning, PluginFieldNormalValueRange normalRangeForCritical, Func<double?> fetchValue) {}
- public static IPluginField CreateField(string name, string label, PluginFieldGraphStyle graphStyle, PluginFieldNormalValueRange normalRangeForWarning, PluginFieldNormalValueRange normalRangeForCritical, Func<double?> fetchValue) {}
- public static IPluginField CreateField(string name, string label, PluginFieldGraphStyle graphStyle, PluginFieldNormalValueRange normalRangeForWarning, PluginFieldNormalValueRange normalRangeForCritical, string? negativeFieldName, Func<double?> fetchValue) {}
- public static IPlugin CreatePlugin(string name, PluginGraphAttributes graphAttributes, IReadOnlyCollection<IPluginField> fields) {}
- public static IPlugin CreatePlugin(string name, PluginGraphAttributes graphAttributes, IReadOnlyCollection<PluginFieldBase> fields) {}
- public static IPlugin CreatePlugin(string name, PluginGraphAttributes graphAttributes, PluginFieldBase field) {}
- public static IPlugin CreatePlugin(string name, string fieldLabel, Func<double?> fetchFieldValue, PluginGraphAttributes graphAttributes) {}
- public static IPlugin CreatePlugin(string name, string fieldLabel, PluginFieldGraphStyle fieldGraphStyle, Func<double?> fetchFieldValue, PluginGraphAttributes graphAttributes) {}
- }
-
- public abstract class PluginFieldBase : IPluginField {
- protected PluginFieldBase(string label, string? name, ...Smdn.Net.MuninNode version 2.0.0
Released package
Release notes
The full release notes are available at gist.
Change log
Change log in this release:
- 2024-11-03 update assembly version
- 2024-11-03 require .NET SDK version 8.0 or later
- 2024-11-03 add support for 'graph_total' attribute
- 2024-11-03 improve LocalNode.Create to be able to accept the list of addresses allowed to access LocalNode
- 2024-11-03 introduce IPluginGraphAttributes to make configuring graph attributes more flexible
- 2024-10-31 introduce IAccessRule to allow access to NodeBase to be configured using with IServiceCollection
- 2024-10-28 make LocalNode abstract
- 2024-10-28 make NodeBase.HostName abstract
API changes
API changes in this release:
diff --git a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs
index 130febd..62a4f2b 100644
--- a/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs
+++ b/doc/api-list/Smdn.Net.MuninNode/Smdn.Net.MuninNode-net6.0.apilist.cs
@@ -1,215 +1,221 @@
-// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-1.3.0)
+// Smdn.Net.MuninNode.dll (Smdn.Net.MuninNode-2.0.0)
// Name: Smdn.Net.MuninNode
-// AssemblyVersion: 1.3.0.0
-// InformationalVersion: 1.3.0+191d215fe57392cb544e2ffea221644a1007cfc0
+// AssemblyVersion: 2.0.0.0
+// InformationalVersion: 2.0.0+0c4121c0bc87932e6486c3b38a123cb59460ac02
// TargetFramework: .NETCoreApp,Version=v6.0
// Configuration: Release
// Referenced assemblies:
// Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
// Smdn.Fundamental.Exception, Version=3.0.0.0, Culture=neutral
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.ComponentModel, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.IO.Pipelines, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Memory, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.Net.Primitives, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Net.Sockets, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Security.Cryptography.Algorithms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// System.Text.RegularExpressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Smdn.Net.MuninNode;
using Smdn.Net.MuninPlugin;
namespace Smdn.Net.MuninNode {
- public class LocalNode : NodeBase {
- public LocalNode(IPluginProvider pluginProvider, string hostName, int port, ILogger? logger = null) {}
- public LocalNode(IPluginProvider pluginProvider, string hostName, int port, IServiceProvider? serviceProvider = null) {}
- public LocalNode(IReadOnlyCollection<IPlugin> plugins, int port, IServiceProvider? serviceProvider = null) {}
- public LocalNode(IReadOnlyCollection<IPlugin> plugins, string hostName, int port, IServiceProvider? serviceProvider = null) {}
+ public interface IAccessRule {
+ bool IsAcceptable(IPEndPoint remoteEndPoint);
+ }
+
+ public static class IAccessRuleServiceCollectionExtensions {
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IAccessRule accessRule) {}
+ public static IServiceCollection AddMuninNodeAccessRule(this IServiceCollection services, IReadOnlyList<IPAddress> addressListAllowFrom) {}
+ }
- public IPEndPoint LocalEndPoint { get; }
+ public abstract class LocalNode : NodeBase {
+ public static LocalNode Create(IPluginProvider pluginProvider, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
+ public static LocalNode Create(IReadOnlyCollection<IPlugin> plugins, int port, string? hostName = null, IReadOnlyList<IPAddress>? addressListAllowFrom = null, IServiceProvider? serviceProvider = null) {}
+
+ protected LocalNode(IAccessRule? accessRule, ILogger? logger = null) {}
protected override Socket CreateServerSocket() {}
- protected override bool IsClientAcceptable(IPEndPoint remoteEndPoint) {}
+ protected virtual EndPoint GetLocalEndPointToBind() {}
}
public abstract class NodeBase :
IAsyncDisposable,
IDisposable
{
- private protected class PluginProvider : IPluginProvider {
- public PluginProvider(IReadOnlyCollection<IPlugin> plugins) {}
-
- public IReadOnlyCollection<IPlugin> Plugins { get; }
- public INodeSessionCallback? SessionCallback { get; }
- }
-
- protected NodeBase(IPluginProvider pluginProvider, string hostName, ILogger? logger) {}
- protected NodeBase(IReadOnlyCollection<IPlugin> plugins, string hostName, ILogger? logger) {}
+ protected NodeBase(IAccessRule? accessRule, ILogger? logger) {}
public virtual Encoding Encoding { get; }
- public string HostName { get; }
+ public abstract string HostName { get; }
+ public EndPoint LocalEndPoint { get; }
protected ILogger? Logger { get; }
public virtual Version NodeVersion { get; }
- [Obsolete("This member will be deprecated in future version.")]
- public IReadOnlyCollection<IPlugin> Plugins { get; }
+ public abstract IPluginProvider PluginProvider { get; }
public async ValueTask AcceptAsync(bool throwIfCancellationRequested, CancellationToken cancellationToken) {}
public async ValueTask AcceptSingleSessionAsync(CancellationToken cancellationToken = default) {}
protected abstract Socket CreateServerSocket();
protected virtual void Dispose(bool disposing) {}
public void Dispose() {}
public async ValueTask DisposeAsync() {}
protected virtual async ValueTask DisposeAsyncCore() {}
- protected abstract bool IsClientAcceptable(IPEndPoint remoteEndPoint);
public void Start() {}
+ protected void ThrowIfPluginProviderIsNull() {}
}
}
namespace Smdn.Net.MuninPlugin {
public interface INodeSessionCallback {
ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken);
ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken);
}
public interface IPlugin {
IPluginDataSource DataSource { get; }
- PluginGraphAttributes GraphAttributes { get; }
+ IPluginGraphAttributes GraphAttributes { get; }
string Name { get; }
INodeSessionCallback? SessionCallback { get; }
}
public interface IPluginDataSource {
IReadOnlyCollection<IPluginField> Fields { get; }
}
public interface IPluginField {
PluginFieldAttributes Attributes { get; }
string Name { get; }
ValueTask<string> GetFormattedValueStringAsync(CancellationToken cancellationToken);
}
+ public interface IPluginGraphAttributes {
+ IEnumerable<string> EnumerateAttributes();
+ }
+
public interface IPluginProvider {
IReadOnlyCollection<IPlugin> Plugins { get; }
INodeSessionCallback? SessionCallback { get; }
}
public enum PluginFieldGraphStyle : int {
Area = 1,
AreaStack = 3,
Default = 0,
Line = 100,
LineStack = 200,
LineStackWidth1 = 201,
LineStackWidth2 = 202,
LineStackWidth3 = 203,
LineWidth1 = 101,
LineWidth2 = 102,
LineWidth3 = 103,
Stack = 2,
}
public class Plugin :
INodeSessionCallback,
IPlugin,
IPluginDataSource
{
public Plugin(string name, PluginGraphAttributes graphAttributes, IReadOnlyCollection<IPluginField> fields) {}
public IReadOnlyCollection<IPluginField> Fields { get; }
public PluginGraphAttributes GraphAttributes { get; }
public string Name { get; }
IPluginDataSource IPlugin.DataSource { get; }
+ IPluginGraphAttributes IPlugin.GraphAttributes { get; }
INodeSessionCallback? IPlugin.SessionCallback { get; }
IReadOnlyCollection<IPluginField> IPluginDataSource.Fields { get; }
protected virtual ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken) {}
protected virtual ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken) {}
ValueTask INodeSessionCallback.ReportSessionClosedAsync(string sessionId, CancellationToken cancellati...