chore: added Posts

This commit is contained in:
willem.serruys
2025-12-29 05:56:07 +01:00
parent 23207c9b4b
commit 16b515de2d
2 changed files with 7 additions and 6 deletions

View File

@@ -132,10 +132,10 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${REPO_DIR}/configurations/otel/collector-config.yaml:/etc/otelcol-contrib/config.yaml - ${REPO_DIR}/configurations/otel/collector-config.yaml:/etc/otelcol-contrib/config.yaml
# Only enable if external services present
# ports:
# - 4317:4317 # OTLP gRPC receiver
power_control: power_control:
build: build:
context: . context: .
dockerfile: ./dockerfiles/power_control.Dockerfile dockerfile: ./dockerfiles/power_control.Dockerfile
# Only enable if external services present
# ports:
# - 4317:4317 # OTLP gRPC receiver

View File

@@ -4,17 +4,18 @@ var builder = WebApplication.CreateBuilder(args);
var app = builder.Build(); var app = builder.Build();
app.MapGet( app.MapPost(
"/high_power_alert", "/high_power_alert",
() => (object body) =>
{ {
Console.WriteLine("high power alert was received."); Console.WriteLine("high power alert was received.");
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(body));
return new OkResult(); return new OkResult();
} }
) )
.WithName("HighPowerAlert"); .WithName("HighPowerAlert");
app.MapGet( app.MapPost(
"/low_power_alert", "/low_power_alert",
() => () =>
{ {