refactor!: rename the project from Monitor to MoShiro [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

Namespaces, assemblies, solution, binaries, images, systemd units, config paths, environment variables, protocol methods and the Linux user are all renamed. Breaking: existing databases, node identities and installed units must be recreated.
This commit is contained in:
justme committed 2026-10-07 02:03:25 +08:00
1 parent 27ac7fb787
commit 2e146d4da7
309 files changed
+1565 -1572

No files matched your search

@@ -0,0 +1,30 @@
using Fleet.Server;
using Microsoft.Extensions.DependencyInjection;
using MoShiro.Backend.Application;
namespace MoShiro.Backend.Storage.Sqlite;
public static class StorageServiceCollectionExtensions
{
/// <summary>注册 SQLite + 段文件存储:实现 Application 的全部存储端口,同时实现 Fleet 的 <see cref="IFleetStore"/>。</summary>
public static IServiceCollection AddMoShiroSqlite(this IServiceCollection services, string dataDirectory)
{
services.AddSingleton(_ => new SqliteDatabase(dataDirectory));
services.AddSingleton<SqliteAgentStore>();
services.AddSingleton<IAgentStore>(p => p.GetRequiredService<SqliteAgentStore>());
services.AddSingleton<IFleetStore>(p => p.GetRequiredService<SqliteAgentStore>());
services.AddSingleton<IJoinTokenStore, SqliteJoinTokenStore>();
services.AddSingleton<IProbeStore, SqliteProbeStore>();
services.AddSingleton<ISettingsStore, SqliteSettingsStore>();
services.AddSingleton<ITaskStore, SqliteTaskStore>();
services.AddSingleton<ITestStore, SqliteTestStore>();
services.AddSingleton<IEventStore, SqliteEventStore>();
services.AddSingleton<IHostStore, SqliteHostStore>();
services.AddSingleton<INodeMetaStore, SqliteNodeMetaStore>();
services.AddSingleton<IAuthStore, SqliteAuthStore>();
services.AddSingleton<IRawStore, SqliteRawStore>();
services.AddSingleton<IMetricStore, SqliteMetricStore>();
services.AddSingleton<IStorageHealth, SqliteStorageHealth>();
return services;
}
}