Skip to content

[poststation] Device Metadata? #12

@jamesmunns

Description

@jamesmunns

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:

  1. 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
  2. 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,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-rfcDesign questions for poststation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions