ci: bsds: rebuild packages after reconfiguration
[m6w6/libmemcached] / include / libmemcached-1.0 / struct / memcached.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - 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 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 struct memcached_st {
19 /**
20 @note these are static and should not change without a call to behavior.
21 */
22 struct {
23 bool is_purging : 1;
24 bool is_processing_input : 1;
25 bool is_time_for_rebuild : 1;
26 bool is_parsing : 1;
27 } state;
28
29 struct {
30 // Everything below here is pretty static.
31 bool auto_eject_hosts : 1;
32 bool binary_protocol : 1;
33 bool buffer_requests : 1;
34 bool hash_with_namespace : 1;
35 bool no_block : 1; // Don't block
36 bool reply : 1;
37 bool randomize_replica_read : 1;
38 bool support_cas : 1;
39 bool tcp_nodelay : 1;
40 bool use_sort_hosts : 1;
41 bool use_udp : 1;
42 bool verify_key : 1;
43 bool tcp_keepalive : 1;
44 bool is_aes : 1;
45 bool is_fetching_version : 1;
46 bool not_used : 1;
47 } flags;
48
49 memcached_server_distribution_t distribution;
50 hashkit_st hashkit;
51 struct {
52 unsigned int version;
53 } server_info;
54 uint32_t number_of_hosts;
55 memcached_instance_st *servers;
56 memcached_instance_st *last_disconnected_server;
57 int32_t snd_timeout;
58 int32_t rcv_timeout;
59 uint32_t server_failure_limit;
60 uint32_t server_timeout_limit;
61 uint32_t io_msg_watermark;
62 uint32_t io_bytes_watermark;
63 uint32_t io_key_prefetch;
64 uint32_t tcp_keepidle;
65 int32_t poll_timeout;
66 int32_t connect_timeout; // How long we will wait on connect() before we will timeout
67 int32_t retry_timeout;
68 int32_t dead_timeout;
69 int send_size;
70 int recv_size;
71 void *user_data;
72 uint64_t query_id;
73 uint32_t number_of_replicas;
74 memcached_result_st result;
75
76 struct {
77 bool weighted_;
78 uint32_t continuum_count; // Ketama
79 uint32_t continuum_points_counter; // Ketama
80 time_t next_distribution_rebuild; // Ketama
81 struct memcached_continuum_item_st *continuum; // Ketama
82 } ketama;
83
84 struct memcached_virtual_bucket_t *virtual_bucket;
85
86 struct memcached_allocator_t allocators;
87
88 memcached_clone_fn on_clone;
89 memcached_cleanup_fn on_cleanup;
90 memcached_trigger_key_fn get_key_failure;
91 memcached_trigger_delete_key_fn delete_trigger;
92 memcached_callback_st *callbacks;
93 struct memcached_sasl_st sasl;
94 struct memcached_error_t *error_messages;
95 struct memcached_array_st *_namespace;
96 struct {
97 uint32_t initial_pool_size;
98 uint32_t max_pool_size;
99 int32_t
100 version; // This is used by pool and others to determine if the memcached_st is out of date.
101 struct memcached_array_st *filename;
102 } configure;
103 struct {
104 bool is_allocated : 1;
105 } options;
106 };