feat: add labels to NodeInfo
This commit is contained in:
@@ -16,20 +16,27 @@ ClusterManager cluster(ctx, taskManager);
|
||||
ApiServer apiServer(ctx, taskManager, ctx.config.api_server_port);
|
||||
|
||||
void setup() {
|
||||
// Setup WiFi first
|
||||
network.setupWiFi();
|
||||
// Setup WiFi first
|
||||
network.setupWiFi();
|
||||
|
||||
// Initialize and start all tasks
|
||||
taskManager.initialize();
|
||||
|
||||
// Start the API server
|
||||
apiServer.begin();
|
||||
|
||||
// Print initial task status
|
||||
taskManager.printTaskStatus();
|
||||
// Add example labels for this node
|
||||
auto it = ctx.memberList->find(ctx.hostname);
|
||||
if (it != ctx.memberList->end()) {
|
||||
it->second.labels["app"] = "base";
|
||||
it->second.labels["role"] = "demo";
|
||||
}
|
||||
|
||||
// Initialize and start all tasks
|
||||
taskManager.initialize();
|
||||
|
||||
// Start the API server
|
||||
apiServer.begin();
|
||||
|
||||
// Print initial task status
|
||||
taskManager.printTaskStatus();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
taskManager.execute();
|
||||
yield();
|
||||
taskManager.execute();
|
||||
yield();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user