Skip to content

Commit

Permalink
Reduce subsystem interface implementation requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
pvanbuijtene committed Jan 12, 2024
1 parent 1a587a3 commit 6f5d7e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ jobs:
- name: Scan for Vulnerabilities
shell: bash
run: |
dotnet restore src
dotnet list src package --vulnerable --include-transitive | tee vulnerabilities.txt
cd src
dotnet restore
dotnet list package --vulnerable --include-transitive | tee vulnerabilities.txt
! cat vulnerabilities.txt | grep -q "has the following vulnerable packages"
build:
strategy:
Expand Down
7 changes: 3 additions & 4 deletions src/EventStore.Plugins/Subsystems/ISubsystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;

Expand All @@ -8,6 +7,6 @@ namespace EventStore.Plugins.Subsystems;
public interface ISubsystem {
IApplicationBuilder Configure(IApplicationBuilder builder);
IServiceCollection ConfigureServices(IServiceCollection services);
IReadOnlyList<Task> Start();
void Stop();
Task Start();
Task Stop();
}
4 changes: 2 additions & 2 deletions src/EventStore.Plugins/Subsystems/ISubsystemFactory.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace EventStore.Plugins.Subsystems;

public interface ISubsystemFactory<TArg> {
ISubsystem Create(TArg arg);
public interface ISubsystemFactory {
ISubsystem Create();
}
5 changes: 2 additions & 3 deletions src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
namespace EventStore.Plugins.Subsystems;

// A plugin that can create multiple subsystems.
// A TArg is required to produce each subsystem from its respective factory.
public interface ISubsystemsPlugin<TArg> {
public interface ISubsystemsPlugin {
string Name { get; }
string Version { get; }
string CommandLineName { get; }
IReadOnlyList<ISubsystemFactory<TArg>> GetSubsystemFactories(string configPath);
IReadOnlyList<ISubsystemFactory> GetSubsystemFactories(string configPath);
}

0 comments on commit 6f5d7e8

Please sign in to comment.