Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

maat-hash

Rust implementation for consistent hashing.

Named after Ma'at, the ancient Egyptian goddess representing truth, balance, and order. This name reflects the stability and balance inherent in consistent hashing.

Sample code:

        //given
        let mut ring = DefaultMaatRing::new(100, 10);
        let server = Server::new(
            String::from("1.10.11.12"),
            61,
            true,
        );
        ring.accept(&server);

        let payload = Payload::new(String::from("test"));
        let request = Request::of(payload);

        //when
        let result = ring.route(&request);

        //then
        assert!(result.is_ok());
        match result {
            Ok(found) => { assert!(found == server) }
            Err(_) => {}
        }

About

Rust implementation for consistent hashing

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages