Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to keep a state between two handler's executions? #80

Open
r00ta opened this issue Jun 27, 2022 · 1 comment
Open

How to keep a state between two handler's executions? #80

r00ta opened this issue Jun 27, 2022 · 1 comment

Comments

@r00ta
Copy link

r00ta commented Jun 27, 2022

Hi Sensu team,

I see that the handler execution is stateless, but in some use cases it's useful to keep a state between two executions. Is there any existing solution for this use case?

If not, do you think it's something that might be implemented in the future?

Thank you

@echlebek
Copy link
Contributor

I think that generally, the retention of state between handler executions will be quite specific to the handler in question, and I don't see a useful way to support it in the SDK.

As to how it's implemented: I'd expect handlers to have a string config option that specifies a path to a state file, with the handler using its own logic for determining what that state means.

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

No branches or pull requests

2 participants