Files
satellite-provider/SatelliteProvider.Services.RouteManagement/TileProvision/RouteTileDeliveryModels.cs
T
Oleksandr Bezdieniezhnykh 275ee1b554
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status
Add TileProvision configuration and gRPC service for tile delivery
- Introduced new TileProvision settings in appsettings.json, including MaxTilesPerBatch and ProgressEmitIntervalSeconds.
- Configured TileProvisionConfig in Program.cs to bind the new settings.
- Added gRPC service for RouteTileDelivery in Program.cs to handle tile delivery requests.
- Updated SatelliteProvider.Api.csproj to include Grpc.AspNetCore package and added protobuf file for tile provision.
- Enhanced AuthenticationServiceCollectionExtensions to handle JWT token extraction from the Authorization header.
- Registered additional services in RouteManagementServiceCollectionExtensions for tile processing.

These changes enhance the API's capability to manage tile provisioning and delivery efficiently.
2026-06-23 13:18:59 +03:00

28 lines
1.2 KiB
C#

namespace SatelliteProvider.Services.RouteManagement.TileProvision;
public sealed record RouteTileDeliveryJob(
Guid RouteId,
IReadOnlyList<(double Lat, double Lon)> Waypoints,
double RegionSizeMeters,
int Zoom,
IReadOnlyList<IReadOnlyList<(double Lat, double Lon)>> GeofenceVertices,
bool IncludeGeofenceTiles,
IReadOnlyList<ClientTileSnapshot> ClientTiles);
public sealed record PreparedTileDelivery(
RouteTileCandidate Candidate,
byte[] Jpeg,
byte[] ContentSha256,
double ResolutionMetersPerPx,
DateTime CapturedAtUtc,
string Source);
public interface IRouteTileDeliverySink
{
ValueTask WriteManifestAsync(uint totalCandidates, uint skippedByClient, uint toDeliver, CancellationToken cancellationToken);
ValueTask WriteBatchAsync(uint batchSeq, IReadOnlyList<PreparedTileDelivery> tiles, CancellationToken cancellationToken);
ValueTask WriteProgressAsync(uint delivered, uint total, uint downloading, CancellationToken cancellationToken);
ValueTask WriteCompleteAsync(uint delivered, uint skippedClient, uint skippedServerFilter, CancellationToken cancellationToken);
ValueTask WriteErrorAsync(string code, string message, bool retryable, CancellationToken cancellationToken);
}