feat: node updates by restart, auto by default; Podman Quadlet install from the panel alongside compose [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

This commit is contained in:
justme committed 2026-10-09 01:33:22 +08:00
1 parent 88b1a0a9bb
commit 535bb3517d
32 files changed
+751 -152

No files matched your search

+5 -5
View File
@@ -31,7 +31,7 @@ public sealed class AgentApp : IDisposable
private readonly TaskCompletionSource _ready = new(TaskCreationOptions.RunContinuationsAsynchronously);
private readonly AgentAdmission _admission;
private readonly Outbox _outbox = new(64 << 20);
private readonly UpdateBridge _update;
private readonly RestartUpdater? _update;
private readonly BackendUplink _uplink;
private readonly UdpMux _udp;
private readonly TcpAcceptor _tcp;
@@ -46,7 +46,7 @@ public sealed class AgentApp : IDisposable
{
_ownedRestart = restart is null ? new RestartController() : null;
_restart = restart ?? _ownedRestart!;
_update = new UpdateBridge(dataDirectory, new ConfigStore(dataDirectory).Write, log);
_update = RestartUpdater.FromEnvironment("agent", _restart.RequestNow, time, log);
_config = config;
_identity = identity;
_time = time;
@@ -235,7 +235,7 @@ public sealed class AgentApp : IDisposable
{
router.OnNotify(MoShiroMethods.UpdateOffer, MoShiroJsonContext.Default.UpdateOfferParams, (_, offer, _) =>
{
_update.WriteOffer(offer);
_update?.Offer(offer);
return ValueTask.CompletedTask;
});
}
@@ -257,7 +257,7 @@ public sealed class AgentApp : IDisposable
{
router.OnNotify(MoShiroMethods.UpdateApply, MoShiroJsonContext.Default.UpdateOfferParams, (_, _, _) =>
{
_update.RequestApply();
_update?.RequestApply();
return ValueTask.CompletedTask;
});
}
@@ -341,7 +341,7 @@ public sealed class AgentApp : IDisposable
DroppedInvalid = _counters.DroppedInvalid,
DroppedRateLimited = _counters.DroppedRateLimited,
QueueBytes = _outbox.PendingBytes,
Update = _update.ReadStatus(),
Update = _update?.Status(),
};
_lastIn = packetsIn;
_lastOut = packetsOut;