Skip to content

ENT-14195 0. README for cf-reactor event handling - #6352

Merged
olehermanse merged 1 commit into
cfengine:masterfrom
victormlg:cf-reactor-readme
Sep 15, 2026
Merged

olehermanse merged 1 commit into
cfengine:masterfrom
victormlg:cf-reactor-readme

Conversation

@victormlg

Copy link
Copy Markdown
Contributor

No description provided.

@victormlg victormlg changed the title README for cf-reactor event handling ENT-14195 0. README for cf-reactor event handling Sep 7, 2026
Comment thread cf-reactor/README.md Outdated
Comment thread cf-reactor/README.md Outdated
Comment thread cf-reactor/README.md Outdated
Comment thread cf-reactor/README.md

@olehermanse olehermanse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This README is a good starting point. I would prefer if it focused a bit more on the high level architecture and terminology, instead of going straight into structs and specific function names.

Signed-off-by: Victor Moene <victor.moene@northern.tech>
Comment thread cf-reactor/README.md
Rather than exposing the raw file-descriptor bookkeeping required for `select(2)`, we introduce a unified interface that serves both the reactor-plugin and event-driven code paths. This is achieved by encapsulating all relevant state in a context struct, `ReactorContext`:

```C
typedef struct ReactorContext

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have two Seq *, one for reactor-plugin FDs, and one for the other FDs? Or perhaps one Seq * where FDs are wrapped in a struct with flags determining who owns them?

@olehermanse
olehermanse merged commit 60b2bc0 into cfengine:master Sep 15, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants