3 * Copyright (C) 2009 Brian Aker
6 * Use and distribution licensed under the BSD license. See
7 * the COPYING file in the parent directory for full text.
10 #ifndef HASHKIT_TYPES_H
11 #define HASHKIT_TYPES_H
20 HASHKIT_MEMORY_ALLOCATION_FAILURE
,
21 HASHKIT_MAXIMUM_RETURN
/* Always add new error code before */
25 HASHKIT_HASH_DEFAULT
= 0, // hashkit_one_at_a_time()
29 HASHKIT_HASH_FNV1A_64
,
31 HASHKIT_HASH_FNV1A_32
,
36 } hashkit_hash_algorithm_t
;
39 * Hash distributions that are available to use.
43 HASHKIT_DISTRIBUTION_MODULA
,
44 HASHKIT_DISTRIBUTION_RANDOM
,
45 HASHKIT_DISTRIBUTION_KETAMA
,
46 HASHKIT_DISTRIBUTION_MAX
/* Always add new values before this. */
47 } hashkit_distribution_t
;
50 typedef struct hashkit_st hashkit_st
;
51 typedef uint32_t (*hashkit_hash_fn
)(const char *key
, size_t key_length
);
57 #endif /* HASHKIT_TYPES_H */