Blockstream / Blockstream/cln-plugins

event-plugin: Replace source enum with metadata field in events plugin

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3
Forks
0
Avg merge
1d 11h
Merged PRs (30d)
2

Description

# Problem
Right now we have a required env var field `source-kind` that is related to the LSP architecture. This field is added to an every event emitted and helps to distinguish between different node types within LSP architecture.

# Solution
Since we want the plugin to be more generic, we need to get rid from `source-kind`, however still have an ability to add additional information to an event. Therefore, we'll benefit from a new field called 'meta':
- `meta` should be set via env variables. We can go in both ways of providing meta data:
- env variables. We can define an environment variable which would receive metadata as a key-value string. e.g. this could be in JSON format, something like `EVENT_PLUGIN_META='{"source_kind": "gateway"}'`;
- config file. We can have a config file (e.g. `.toml`) which would contain an information. That's might suit us well since we already have a config file;
- apply both variants;
- the flow should be the same as it was introduced for `source-kind`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.