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

Refactor FilterManager into SharedFilterChain #491

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

XAMPPRocky
Copy link
Collaborator

@XAMPPRocky XAMPPRocky commented Feb 22, 2022

This PR refactors FilterManager into SharedFilterChain, which instead of using message passing, uses ArcSwap to provide a updatable handle to a filter chain. This simplifies a lot of the communication infrastructure as we can just pass SharedFilterChain directly around instead, update it as needed, and it will be updated on subsequent loads. This also makes it easy to inspect the current state of the filter chain.

@XAMPPRocky XAMPPRocky force-pushed the filter-manager-update branch from 32114bc to 0997cf2 Compare March 3, 2022 08:36
@XAMPPRocky XAMPPRocky force-pushed the filter-manager-update branch 3 times, most recently from af76178 to 416fc91 Compare March 9, 2022 09:58
@github-actions github-actions bot added size/l and removed size/xl labels Mar 9, 2022
Copy link
Contributor

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

One minor nit on the copyright, but approved so you can merge whenever it's fixed.

}
}

impl TryFrom<&[FilterConfig]> for FilterChain {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice refactor 👍🏻

@XAMPPRocky XAMPPRocky force-pushed the filter-manager-update branch from 416fc91 to 6e705da Compare March 10, 2022 08:48
@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 81e22ae3-e856-445a-8787-553b8d9bcf27

To build this version:

git fetch [email protected]:googleforgames/quilkin.git pull/491/head:pr_491 && git checkout pr_491
cargo build

@XAMPPRocky XAMPPRocky merged commit a0ea9e1 into main Mar 10, 2022
@XAMPPRocky XAMPPRocky deleted the filter-manager-update branch March 10, 2022 09:09
@markmandel markmandel added the kind/cleanup Refactoring code, fixing up documentation, etc label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Refactoring code, fixing up documentation, etc size/l
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants