一键导入
add-actor
Create a new actor with builder in the thin-edge.io actor framework. Use when implementing a new concurrent component that processes messages.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a new actor with builder in the thin-edge.io actor framework. Use when implementing a new concurrent component that processes messages.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Expert Rust code review focused on correctness, testing, and idiomatic code. Use when reviewing a diff, file, or change for bugs, test gaps, and non-idiomatic Rust.
Add a new configuration option to tedge_config. Use when adding a new setting to the thin-edge.io configuration in tedge.toml.
Add a new extension of `tedge-mapper` or `tedge-agent` as an actor.
Write a Robot Framework integration test for thin-edge.io. Use when adding end-to-end tests.
Add a new plugin binary to thin-edge.io. Use when creating a new extension of built-in operations supported by tedge-agent.
基于 SOC 职业分类
| name | add-actor |
| description | Create a new actor with builder in the thin-edge.io actor framework. Use when implementing a new concurrent component that processes messages. |
crates/extensionsmessages.rs:
Message: Debug + Send + Sync + 'staticServer pattern, or input/output for Actor patternfan_in_message_type!(CombinedMsg[MsgA, MsgB] : Clone, Debug);
pub struct MyActor {
message_box: SimpleMessageBox<InputMsg, OutputMsg>,
// or: message_box: ServerMessageBox<Request, Response>,
}
Actor trait:
fn name(&self) -> &str — unique identifierasync fn run(self) -> Result<(), RuntimeError> — main message loopSimpleMessageBoxBuilder — for event-driven actors (fire-and-forget)ServerMessageBoxBuilder — for request-response actorsBuilder<MyActor> — fn try_build(self) -> Result<MyActor, ...>RuntimeRequestSink — fn get_signal_sender(&self) -> DynSender<RuntimeRequest>MessageSink<M> — for each input message typeMessageSource<M, Config> — for each output message typebuilder.connect_sink(other_builder.get_sender());
builder.connect_source(other_builder);
SimpleMessageBoxBuilder test harnessesRead these for patterns:
crates/core/tedge_actors/src/lib.rs — framework docs and all public APIcrates/extensions/tedge_timer_ext/ — complete actor with server message box, builder, and testscrates/extensions/tedge_signal_ext/src/lib.rs — minimal actor with simple message boxdesign/thin-edge-actors-design.md — architecture and design rationale