Memcached-libmemcached
view release on metacpan or search on metacpan
src/libmemcached/libmemcachedprotocol-0.0/binary.h view on Meta::CPAN
struct {
uint16_t size;
uint8_t reserved;
uint8_t flags;
uint32_t max_results;
} body;
} message;
uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
} protocol_binary_request_rangeop;
typedef protocol_binary_request_rangeop protocol_binary_request_rget;
typedef protocol_binary_request_rangeop protocol_binary_request_rset;
typedef protocol_binary_request_rangeop protocol_binary_request_rsetq;
typedef protocol_binary_request_rangeop protocol_binary_request_rappend;
typedef protocol_binary_request_rangeop protocol_binary_request_rappendq;
typedef protocol_binary_request_rangeop protocol_binary_request_rprepend;
typedef protocol_binary_request_rangeop protocol_binary_request_rprependq;
typedef protocol_binary_request_rangeop protocol_binary_request_rdelete;
typedef protocol_binary_request_rangeop protocol_binary_request_rdeleteq;
typedef protocol_binary_request_rangeop protocol_binary_request_rincr;
typedef protocol_binary_request_rangeop protocol_binary_request_rincrq;
typedef protocol_binary_request_rangeop protocol_binary_request_rdecr;
typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq;
/**
* Definition of tap commands
* See To be written
*
*/
typedef union {
struct {
protocol_binary_request_header header;
struct {
/**
* flags is a bitmask used to set properties for the
* the connection. Please In order to be forward compatible
* you should set all undefined bits to 0.
*
* If the bit require extra userdata, it will be stored
* in the user-data field of the body (passed to the engine
* as enginespeciffic). That means that when you parse the
* flags and the engine-specific data, you have to work your
* way from bit 0 and upwards to find the correct offset for
* the data.
*
*/
uint32_t flags;
/**
* Backfill age
*
* By using this flag you can limit the amount of data being
* transmitted. If you don't specify a backfill age, the
* server will transmit everything it contains.
*
* The first 8 bytes in the engine specific data contains
* the oldest entry (from epoc) you're interested in.
* Specifying a time in the future (for the server you are
* connecting to), will cause it to start streaming current
* changes.
*/
#define TAP_CONNECT_FLAG_BACKFILL 0x01
/**
* Dump will cause the server to send the data stored on the
* server, but disconnect when the keys stored in the server
* are transmitted.
*/
#define TAP_CONNECT_FLAG_DUMP 0x02
/**
* The body contains a list of 16 bits words in network byte
* order specifying the vbucket ids to monitor. The first 16
* bit word contains the number of buckets. The number of 0
* means "all buckets"
*/
#define TAP_CONNECT_FLAG_LIST_VBUCKETS 0x04
/**
* The responsibility of the vbuckets is to be transferred
* over to the caller when all items are transferred.
*/
#define TAP_CONNECT_FLAG_TAKEOVER_VBUCKETS 0x08
/**
* The tap consumer supports ack'ing of tap messages
*/
#define TAP_CONNECT_SUPPORT_ACK 0x10
/**
* The tap consumer would prefer to just get the keys
* back. If the engine supports this it will set
* the TAP_FLAG_NO_VALUE flag in each of the
* tap packets returned.
*/
#define TAP_CONNECT_REQUEST_KEYS_ONLY 0x20
/**
* The body contains a list of (vbucket_id, last_checkpoint_id)
* pairs. This provides the checkpoint support in TAP streams.
* The last checkpoint id represents the last checkpoint that
* was successfully persisted.
*/
#define TAP_CONNECT_CHECKPOINT 0x40
/**
* The tap consumer is a registered tap client, which means that
* the tap server will maintain its checkpoint cursor permanently.
*/
#define TAP_CONNECT_REGISTERED_CLIENT 0x80
} body;
} message;
uint8_t bytes[sizeof(protocol_binary_request_header) + 4];
} protocol_binary_request_tap_connect;
typedef union {
struct {
protocol_binary_request_header header;
struct {
struct {
uint16_t enginespecific_length;
/*
* The flag section support the following flags
*/
/**
* Request that the consumer send a response packet
( run in 0.850 second using v1.01-cache-2.11-cpan-39bf76dae61 )