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

Support for sending customized format data #39

Open
dierbei opened this issue Oct 15, 2024 · 1 comment
Open

Support for sending customized format data #39

dierbei opened this issue Oct 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dierbei
Copy link
Collaborator

dierbei commented Oct 15, 2024

Currently, only u32 types are supported for sending data:

raft-rs/src/server.rs

Lines 644 to 651 in 5853c9f

let data = u32::from_be_bytes(data[12..16].try_into().unwrap());
let entry = LogEntry {
leader_id: self.id,
server_id: self.id,
term: self.state.current_term,
command,
data,
};

The effect I'm hoping to achieve is to be able to send any type;

@vaibhawvipul
Copy link
Contributor

great idea.

@vaibhawvipul vaibhawvipul added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants