Skip to main content

Fleet discovery and registry — Ship Protocol Layer 5. The lighthouse broadcasting.

Project description

beacon-protocol

Fleet discovery and registry. Ship Protocol Layer 5. The lighthouse broadcasting.

Agents register their capabilities and services. Other agents discover them. Heartbeats keep the roster alive. Beacons broadcast events fleet-wide.

Usage

from beacon_protocol import BeaconRegistry, AgentDescriptor, ServiceType, Beacon

registry = BeaconRegistry()
registry.register(AgentDescriptor(
    agent_id="oracle1", name="Oracle1",
    services=[ServiceType.KEEPER],
    capabilities=["crates", "coordination"],
    endpoint="keeper:8900",
))

# Discover agents with crate publishing capability
agents = registry.discover(capabilities=["crates"])

# Broadcast an event
registry.broadcast(Beacon(agent_id="oracle1", payload={"event": "crate_published"}))

Zero deps. pip install beacon-protocol

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beacon_protocol-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beacon_protocol-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file beacon_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: beacon_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for beacon_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 16c638333f43961f5d4db491a1543c28c09f5c5d29a9331e70315a1c5af0353f
MD5 1f5214822e5de9b4e6326e5cec88ba02
BLAKE2b-256 83da6a20b0e54dab5cd3219d12f72704a9261142fdac79051ba5119039836a2c

See more details on using hashes here.

File details

Details for the file beacon_protocol-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for beacon_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dcfdeaba3fa555f823509c7dc62b890014fdde4830f6ec40420a4bb64ebe0fc
MD5 8deebe6531a6bd202a197f211ae96340
BLAKE2b-256 0550a252e8c0d848bc5b12c01e017271bb595f86844b6c499e17195b53aee1df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page