-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from EventStore/timothycoleman/plugablecomponents
Unify Telemetry Collection and DI usage into one interface: IPlugableComponent
- Loading branch information
Showing
8 changed files
with
22 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Text.Json.Nodes; | ||
using System; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace EventStore.Plugins; | ||
|
||
// Component that can be plugged in to the main server. | ||
// Plugins are libraries that result in IPlugableComponents being produced and plugged in. | ||
public interface IPlugableComponent { | ||
IApplicationBuilder Configure(IApplicationBuilder builder) => builder; | ||
IServiceCollection ConfigureServices(IServiceCollection services, IConfiguration configuration) => services; | ||
void CollectTelemetry(Action<string, JsonNode> reply) { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
using System; | ||
using System.Text.Json.Nodes; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using System.Threading.Tasks; | ||
|
||
namespace EventStore.Plugins.Subsystems; | ||
|
||
public interface ISubsystem : IConfigureServices { | ||
public interface ISubsystem : IPlugableComponent { | ||
string Name { get; } | ||
void CollectTelemetry(Action<string, JsonNode> reply); | ||
Task Start(); | ||
Task Stop(); | ||
} |