65ff83c3199a983614f7237bac843dda3568b566
[awesomized/libmemcached] / include / libmemcachedprotocol-0.0 / vbucket.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached-awesome - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020-2021 Michael Wallner https://awesome.co/ |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 typedef enum {
23 vbucket_state_active = 1, /**< Actively servicing a vbucket. */
24 vbucket_state_replica, /**< Servicing a vbucket as a replica only. */
25 vbucket_state_pending, /**< Pending active. */
26 vbucket_state_dead /**< Not in use, pending deletion. */
27 } vbucket_state_t;
28
29 #define is_valid_vbucket_state_t(state) \
30 (state == vbucket_state_active || state == vbucket_state_replica \
31 || state == vbucket_state_pending || state == vbucket_state_dead)
32
33 #ifdef __cplusplus
34 }
35 #endif