advertise over beacon v2 as metamesh.enrich/full-hash (SDK v1.7.0 beacon feature)
Build and Push Docker Image / build (push) Failing after 14s

This commit is contained in:
Worph
2026-10-04 17:35:09 +00:00
parent 8a905462c0
commit 127bdaa001
3 changed files with 34 additions and 2 deletions
+15
View File
@@ -59,6 +59,21 @@ async fn main() -> anyhow::Result<()> {
tracing::info!("Starting fast-full-hash plugin on {}", addr);
let listener = tokio::net::TcpListener::bind(&addr).await?;
// Beacon v2: findable by meta-sort's Plugins page (Scan → Add). Advertises
// BEACON_ADVERTISE_URL (default http://$HOSTNAME:<port>) and honours
// BEACON_BINDS, which meta-sort sets on the containers it spawns.
let _beacon = {
use meta_feeder_sdk::beacon::{advertise_plugin, advertise_url, binds_from_env, caps, Resource};
advertise_plugin("metamesh-plugin-full-hash", env!("CARGO_PKG_VERSION"), move || {
let mut r = Resource::new("full-hash", [caps::enrich("full-hash")])
.with_endpoint("http", advertise_url(port))
.with_endpoint("manifest", "/manifest");
r.binds = binds_from_env();
r
})
};
axum::serve(listener, app).await?;
Ok(())