Skip to content

Allow passing context to service callbacks #35

@norro

Description

@norro

Currently, service callbacks get

  1. either exactly two arguments: pointer to the request and pointer to the response
  2. or three arguments: pointer to the request, pointer to the response, and the request id

This is rather limiting, as it does not allow to provide any additional context to the callback. E.g., in case of the lifecycle node: when the state change service is called, I currently don't have the possibility to get the lifecycle node on which the state change was called.

I propose to add a third option, in addition to the two introduced above, where a third void * argument allows passing additional context, e.g., the lifecycle node in the example above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions