feat: add SeaweedFS hosting and client integrations#1349
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1349Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1349" |
|
|
||
| filerGroup.MapPost("/upload", async ([FromQuery] string fileName, [FromBody] string content, SeaweedFSFilerClient filerClient) => | ||
| { | ||
| var stringContent = new StringContent(content); |
aaronpowell
left a comment
There was a problem hiding this comment.
Couple of nits on the namespaces and project files
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> |
There was a problem hiding this comment.
| <PropertyGroup> | |
| <TargetFramework>net10.0</TargetFramework> | |
| <ImplicitUsings>enable</ImplicitUsings> | |
| <Nullable>enable</Nullable> | |
| </PropertyGroup> |
Not needed, we configure those with props files.
| <TargetFramework>net10.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> |
There was a problem hiding this comment.
| <TargetFramework>net10.0</TargetFramework> | |
| <ImplicitUsings>enable</ImplicitUsings> | |
| <Nullable>enable</Nullable> |
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> |
There was a problem hiding this comment.
| <ImplicitUsings>enable</ImplicitUsings> | |
| <Nullable>enable</Nullable> |
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Diagnostics.HealthChecks; | ||
|
|
||
| #pragma warning disable ASPIREATS001 |
There was a problem hiding this comment.
Let's not throw in global disabling of warnings, put them at the site required so things don't slip through.
|
|
||
| #pragma warning disable ASPIREATS001 | ||
|
|
||
| namespace CommunityToolkit.Aspire.Hosting.SeaweedFS; |
There was a problem hiding this comment.
| namespace CommunityToolkit.Aspire.Hosting.SeaweedFS; | |
| namespace Aspire.Hosting; |
I think that's all we want it to be - double check other integrations
| using System.Threading.Tasks; | ||
| using Aspire.Hosting.ApplicationModel; | ||
|
|
||
| namespace CommunityToolkit.Aspire.Hosting.SeaweedFS; |
There was a problem hiding this comment.
| namespace CommunityToolkit.Aspire.Hosting.SeaweedFS; | |
| namespace Aspire.Hosting; |
I think that's all we want it to be - double check other integrations
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> |
There was a problem hiding this comment.
| <ImplicitUsings>enable</ImplicitUsings> | |
| <Nullable>enable</Nullable> |
| using Microsoft.Extensions.Diagnostics.HealthChecks; | ||
| using Microsoft.Extensions.Hosting; | ||
|
|
||
| namespace CommunityToolkit.Aspire.SeaweedFS.Client; |
There was a problem hiding this comment.
| namespace CommunityToolkit.Aspire.SeaweedFS.Client; | |
| namespace Microsoft.Extensions.Hosting; |
I think that's all we want it to be - double check other integrations
| using System.Data.Common; | ||
| using Amazon.S3; | ||
|
|
||
| namespace CommunityToolkit.Aspire.SeaweedFS.Client; |
There was a problem hiding this comment.
| namespace CommunityToolkit.Aspire.SeaweedFS.Client; | |
| namespace Microsoft.Extensions.Hosting; |
I think that's all we want it to be - double check other integrations
Closes #1336
Overview of changes
This PR introduces the SeaweedFS integration for the Aspire Community Toolkit, providing a highly performant and scalable object/file storage alternative.
As discussed in the linked issue, it includes:
CommunityToolkit.Aspire.Hosting.SeaweedFS): A robust AppHost resource builder that configures the SeaweedFS cluster, exposing both the S3 Gateway and the Native Filer endpoints dynamically, along with data volume persistence support.CommunityToolkit.Aspire.SeaweedFS.Client): Extensions to seamlessly inject the standardAWSSDK.S3client and a strongly-typedSeaweedFSFilerClientusing Aspire's service discovery, complete with independent health checks.All details and motivations are outlined in the linked issue.
PR Checklist