Skip to content

Pivot middleware #93

@cyberbit

Description

@cyberbit

Refactor targeted metrics by swapping their name and a chosen attribute (source, adapter, unit) or a custom static value. This would require a potential refactor allowing name to be a label.

For example:

backplane
  :addInput('storage', telem.input.refinedStorage('back'))
  :middleware(mw.pivot('unit'))

would produce something like

unit_item = 45 (name = minecraft:cobblestone)
unit_B = 3.12 (name = minecraft:lava)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions