It might be useful to have "metadata" for devices that are automatically queried on connection, similar to schema querying.
IMO this could be in one of two forms:
- I could have multiple "constant" endpoints, like one for "version", "name", etc. This would be hardcoded to some "well known" set that could change over time, but you'd need one endpoint per "well known" metadata, but all devices would have the same endpoints
- I could allow a specific "metadata" endpoint, like I described above, which could look for specific name + type fields in a single endpoint, but would be a different endpoint for every device.
for the former, this would be in the form of adding endpoints like:
poststation/metadata/version: Req: (), Resp: str
poststation/metadata/name: Req: (), Resp: str
- ...
For the latter, users can define a single endpoint with a struct for a response with "well known" fields that each can be queried, for example:
// at path `poststation/metadata`
struct Metadata {
// scraped as the "name"
name: String,
// scraped as "version"
// doesn't have to be string maybe?
version: Version,
}
It might be useful to have "metadata" for devices that are automatically queried on connection, similar to schema querying.
IMO this could be in one of two forms:
for the former, this would be in the form of adding endpoints like:
poststation/metadata/version: Req:(), Resp:strpoststation/metadata/name: Req:(), Resp:strFor the latter, users can define a single endpoint with a struct for a response with "well known" fields that each can be queried, for example: