Skip to content

Release main/Smdn.Net.MuninNode-2.4.0 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 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:
Expand All @@ -19,6 +19,7 @@
// 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;
Expand Down Expand Up @@ -127,6 +128,7 @@ 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() {}
}
Expand Down Expand Up @@ -189,6 +191,7 @@ public class MuninProtocolHandler : IMuninProtocolHandler {
public MuninProtocolHandler(IMuninNodeProfile profile) {}

protected bool IsDirtyConfigEnabled { get; }
protected bool IsMultigraphEnabled { get; }

protected virtual ValueTask HandleCapCommandAsync(IMuninNodeClient client, ReadOnlySequence<byte> arguments, CancellationToken cancellationToken) {}
public ValueTask HandleCommandAsync(IMuninNodeClient client, ReadOnlySequence<byte> commandLine, CancellationToken cancellationToken = default) {}
Expand All @@ -203,7 +206,7 @@ protected virtual ValueTask HandleTransactionEndAsyncCore(IMuninNodeClient clien
public ValueTask HandleTransactionStartAsync(IMuninNodeClient client, CancellationToken cancellationToken = default) {}
protected virtual ValueTask HandleTransactionStartAsyncCore(IMuninNodeClient client, CancellationToken cancellationToken) {}
protected virtual ValueTask HandleVersionCommandAsync(IMuninNodeClient client, CancellationToken cancellationToken) {}
protected async ValueTask SendResponseAsync(IMuninNodeClient client, IEnumerable<string> responseLines, CancellationToken cancellationToken) {}
protected ValueTask SendResponseAsync(IMuninNodeClient client, IEnumerable<string> responseLines, CancellationToken cancellationToken) {}
}

public static class MuninProtocolHandlerFactory {
Expand Down Expand Up @@ -245,6 +248,10 @@ public MuninNodeClientDisconnectedException(string message, Exception innerExcep
}

namespace Smdn.Net.MuninPlugin {
public interface IMultigraphPlugin : IPlugin {
IReadOnlyCollection<IPlugin> Plugins { get; }
}

public interface INodeSessionCallback {
ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken);
ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken);
Expand Down Expand Up @@ -352,6 +359,16 @@ async ValueTask INodeSessionCallback.ReportSessionClosedAsync(string sessionId,
async ValueTask INodeSessionCallback.ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken) {}
}

public class MultigraphPlugin : IMultigraphPlugin {
public MultigraphPlugin(string name, IReadOnlyCollection<IPlugin> plugins) {}

public IPluginDataSource DataSource { get; }
public IPluginGraphAttributes GraphAttributes { get; }
public string Name { get; }
public IReadOnlyCollection<IPlugin> Plugins { get; }
public INodeSessionCallback? SessionCallback { get; }
}

public class Plugin :
INodeSessionCallback,
IPlugin,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// 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: .NETStandard,Version=v2.1
// Configuration: Release
// Referenced assemblies:
Expand Down Expand Up @@ -120,6 +120,7 @@ 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() {}
}
Expand Down Expand Up @@ -182,6 +183,7 @@ public class MuninProtocolHandler : IMuninProtocolHandler {
public MuninProtocolHandler(IMuninNodeProfile profile) {}

protected bool IsDirtyConfigEnabled { get; }
protected bool IsMultigraphEnabled { get; }

protected virtual ValueTask HandleCapCommandAsync(IMuninNodeClient client, ReadOnlySequence<byte> arguments, CancellationToken cancellationToken) {}
public ValueTask HandleCommandAsync(IMuninNodeClient client, ReadOnlySequence<byte> commandLine, CancellationToken cancellationToken = default) {}
Expand All @@ -196,7 +198,7 @@ protected virtual ValueTask HandleTransactionEndAsyncCore(IMuninNodeClient clien
public ValueTask HandleTransactionStartAsync(IMuninNodeClient client, CancellationToken cancellationToken = default) {}
protected virtual ValueTask HandleTransactionStartAsyncCore(IMuninNodeClient client, CancellationToken cancellationToken) {}
protected virtual ValueTask HandleVersionCommandAsync(IMuninNodeClient client, CancellationToken cancellationToken) {}
protected async ValueTask SendResponseAsync(IMuninNodeClient client, IEnumerable<string> responseLines, CancellationToken cancellationToken) {}
protected ValueTask SendResponseAsync(IMuninNodeClient client, IEnumerable<string> responseLines, CancellationToken cancellationToken) {}
}

public static class MuninProtocolHandlerFactory {
Expand Down Expand Up @@ -238,6 +240,10 @@ public MuninNodeClientDisconnectedException(string message, Exception innerExcep
}

namespace Smdn.Net.MuninPlugin {
public interface IMultigraphPlugin : IPlugin {
IReadOnlyCollection<IPlugin> Plugins { get; }
}

public interface INodeSessionCallback {
ValueTask ReportSessionClosedAsync(string sessionId, CancellationToken cancellationToken);
ValueTask ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken);
Expand Down Expand Up @@ -345,6 +351,16 @@ async ValueTask INodeSessionCallback.ReportSessionClosedAsync(string sessionId,
async ValueTask INodeSessionCallback.ReportSessionStartedAsync(string sessionId, CancellationToken cancellationToken) {}
}

public class MultigraphPlugin : IMultigraphPlugin {
public MultigraphPlugin(string name, IReadOnlyCollection<IPlugin> plugins) {}

public IPluginDataSource DataSource { get; }
public IPluginGraphAttributes GraphAttributes { get; }
public string Name { get; }
public IReadOnlyCollection<IPlugin> Plugins { get; }
public INodeSessionCallback? SessionCallback { get; }
}

public class Plugin :
INodeSessionCallback,
IPlugin,
Expand Down