Skip to content
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

Reduce subsystem interface implementation requirements (DB-601) #24

Merged
merged 1 commit into from
Jan 15, 2024
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
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);
}