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

feature(state-operator): Add try_load for State #42

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

AlejandroCabeza
Copy link
Contributor

Add a try_load function to StateOperator.
This try_load is called before the ServiceState::from_settings, giving a chance to initialise the State from a source different than the settings. E.g.: file, db, etc.

Also updated the examples and added tests.

@AlejandroCabeza AlejandroCabeza added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 30, 2024
@AlejandroCabeza AlejandroCabeza self-assigned this Dec 30, 2024
Copy link
Collaborator

@danielSanchezQ danielSanchezQ left a comment

Choose a reason for hiding this comment

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

This looks ok, we can wait for merging and use this as a base branch till we figure it is the way to go.

overwatch-rs/src/services/state.rs Outdated Show resolved Hide resolved
overwatch-rs/src/services/state.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants