ServiceSignature
What a declared service answers on its own port that another program listening there would not. A TCP connect only says that SOMETHING accepts on the port. Measured on a developer machine: a `next-server` listening on :3000 made `coa stack` report the Mercure hub `up` — the port the hub would publish was taken by an unrelated app, and the reader called it the hub (greenhouse evidence/1035). A signature is one HTTP request the service is REQUIRED to answer a certain way — by its protocol, not by a version's wording — so a reader can tell the service from a squatter (greenhouse decisions/0504). Pure data: {@see SignatureProbe} asks.
ServiceSignature::__construct()
public function __construct(string $path, array $statuses):Parameters
| Name | Type | Description |
|---|---|---|
| $path | string | the request path, starting with `/`, that the reader GETs on the probe port |
| $statuses | list<int> | the HTTP statuses the service may answer it with — more than one when the answer depends on how the service is configured, never on its version |
ServiceSignature::matches()
public function matches(?int $status): boolWhether an answer is one the service gives — null (no HTTP came back) never is.
Parameters
| Name | Type | Description |
|---|---|---|
| $status | ?int |