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

Implement Action handling #3

Closed
mempirate opened this issue Jan 6, 2025 · 0 comments · Fixed by #7
Closed

Implement Action handling #3

mempirate opened this issue Jan 6, 2025 · 0 comments · Fixed by #7

Comments

@mempirate
Copy link
Contributor

Context

Implement API Action handling in the main loop:

while let Some(action) = actions.next().await {
match action {
Action::Register { registration, response } => todo!(),
Action::Deregister { deregistration, response } => todo!(),
Action::GetRegistrations { response } => todo!(),
Action::GetValidators { response } => todo!(),
Action::GetValidatorsByPubkeys { pubkeys, response } => todo!(),
Action::GetValidatorsByIndices { indices, response } => todo!(),
Action::GetLookahead { epoch, response } => todo!(),
Action::GetOperator { signer, response } => todo!(),
Action::GetValidatorByPubkey { pubkey, response } => todo!(),
Action::GetOperators { response } => todo!(),
}
}
}

The general pattern is:

Parse the action, get the data (optional), call res = registry.some_action(data), return res on the response channel.

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

Successfully merging a pull request may close this issue.

1 participant