Skip to content
docsv0.17.0

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

Parameters of __construct()
NameTypeDescription
$pathstringthe request path, starting with `/`, that the reader GETs on the probe port
$statuseslist<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): bool

Whether an answer is one the service gives — null (no HTTP came back) never is.

Parameters

Parameters of matches()
NameTypeDescription
$status?int