Skip to content

Commit

Permalink
simplify group administrator to two inner states
Browse files Browse the repository at this point in the history
  • Loading branch information
shortishly committed Aug 26, 2024
1 parent 5e775e4 commit 30e44a5
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 826 deletions.
4 changes: 2 additions & 2 deletions tansu-server/src/coordinator/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub mod administrator;
pub mod consumer;

use crate::Result;
use administrator::{Controller, Fresh, Inner, Wrapper};
use administrator::{Controller, Forming, Inner, Wrapper};
use std::{collections::BTreeMap, fmt::Debug};
use tansu_kafka_sans_io::{
join_group_request::JoinGroupRequestProtocol,
Expand Down Expand Up @@ -194,7 +194,7 @@ pub struct GroupProvider;

impl ProvideCoordinator for GroupProvider {
fn provide_coordinator(&mut self) -> Result<Box<dyn Coordinator>> {
let wrapper: Wrapper = Inner::<Fresh>::default().into();
let wrapper: Wrapper = Inner::<Forming>::default().into();
Ok(Box::new(Controller::new(wrapper)) as Box<dyn Coordinator>)
}
}
Expand Down
Loading

0 comments on commit 30e44a5

Please sign in to comment.