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
21 HASHKIT_MEMORY_ALLOCATION_FAILURE
,
22 HASHKIT_MAXIMUM_RETURN
/* Always add new error code before */
26 HASHKIT_HASH_DEFAULT
= 0, // hashkit_one_at_a_time()
30 HASHKIT_HASH_FNV1A_64
,
32 HASHKIT_HASH_FNV1A_32
,
38 } hashkit_hash_algorithm_t
;
41 * Hash distributions that are available to use.
45 HASHKIT_DISTRIBUTION_MODULA
,
46 HASHKIT_DISTRIBUTION_RANDOM
,
47 HASHKIT_DISTRIBUTION_KETAMA
,
48 HASHKIT_DISTRIBUTION_MAX
/* Always add new values before this. */
49 } hashkit_distribution_t
;
52 typedef struct hashkit_st hashkit_st
;
54 typedef uint32_t (*hashkit_hash_fn
)(const char *key
, size_t key_length
, void *context
);
60 #endif /* HASHKIT_TYPES_H */