Skip to content

Supervisor-level replicator auth plugin callbacks#6070

Merged
nickva merged 1 commit into
mainfrom
auth-plugin-processes-callback
Jul 21, 2026
Merged

Supervisor-level replicator auth plugin callbacks#6070
nickva merged 1 commit into
mainfrom
auth-plugin-processes-callback

Conversation

@nickva

@nickva nickva commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

As discussed in the comments of the new IAM plugin in [1], it would be nice to have a per-plugin supervisor-level context for each plugin. So, for example, they can create some kind of a ETS cache table for their tokens. This is what we implement here. The API is simple:

  • sup_initialize() -> Ctx
  • sup_cleanup(Ctx) -> ok

The APIs are optional to implement. The name pattern mirror the regular plugin API names: initialize(...) -> {ok, ..., Ctx} and cleanup(Ctx) -> ok

[1] #6069

As discussed in the comments of the new IAM plugin in [1], it would be nice to
have a per-plugin supervisor-level context for each plugin. So, for example,
they can create some kind of a ETS cache table for their tokens. This is what
we implement here. The API is simple:

  * `sup_initialize() -> Ctx`
  * `sup_cleanup(Ctx) -> ok`

The APIs are optional to implement. The name pattern mirror the regular plugin
API names: `initialize(...) -> {ok, ..., Ctx}` and `cleanup(Ctx) -> ok`

[1] #6069

@rnewson rnewson 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.

very neat!

@nickva
nickva merged commit c4fd336 into main Jul 21, 2026
55 checks passed
@nickva
nickva deleted the auth-plugin-processes-callback branch July 21, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants