Let rulesets store information in established subscriptions

Open
#618 3 comments 0 reactions 1 assignee View on GitHub

@b1conrad is already working on this.

Since Oct 20, 2022.

Assessment

This issue has not been assessed yet.

Description

enhancement

Proposing a rule that selects on a wrangler:new_key_value_pair event, with attributes: Id the established subscription identifier, key a key not reserved* for subscriptions, and value an optional value (a falsy value to mean remove the key).

The rule to raise a wrangler:key_value_updated event upon successful addition/deletion to/from the established subscription, with the original attributes.

The key-value pair is for the use of the pico that sets it.

For keys that begin either "Rx_" or "Tx_", it is considered good relationship practice to also send a similar event over the subscription to the other side, with the key prefix reversed. Care must be taken to avoid initiating an infinite loop.

*Reserved subscription keys are:

["Id","Rx_role","Tx_role","Rx","Tx","Tx_host"]
Dominant language
TypeScript
Stars
51
Forks
10
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Picolab/pico-engine

All issues in Picolab/pico-engine

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.