Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#3 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust
领域
backend

调研方向

首先跟踪必需的环境字段 source-kind 是如何配置并添加到发出的事件中的。比较现有的环境和配置文件处理方式,然后在保留事件发出的同时,将该流程替换为支持 meta;当可以通过受支持的配置路径提供元数据,并且不再需要 source-kind 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Rust
星标
3
派生
0
平均合并
1 天 11 小时
30 天内合并 PR
2

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Blockstream/cln-plugins 的其他 Issue

查看 Blockstream/cln-plugins 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。