static char *opt_passwd;
#define PROGRAM_NAME "memexist"
-#define PROGRAM_DESCRIPTION "Erase a key or set of keys from a memcached cluster."
+#define PROGRAM_DESCRIPTION "Check for the existance of a key within a cluster."
/* Prototypes */
static void options_parse(int argc, char *argv[]);
--- /dev/null
+===========================================
+memexist - Check for the existance of a key
+===========================================
+
+
+--------
+SYNOPSIS
+--------
+
+memexist [options] [key]
+
+.. program:: memexist
+
+
+-----------
+DESCRIPTION
+-----------
+
+:program:`memexist` checks for the existance of a key within a cluster.
+
+
+-------
+OPTIONS
+-------
+
+
+You can specify servers via the option:
+
+.. option:: --servers
+
+or via the environment variable:
+
+.. envvar:: `MEMCACHED_SERVERS`
+
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+
+For a full list of operations run the tool with the option:
+
+.. option:: --help
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://libmemcached.org/ <http://libmemcached.org/>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
+
--- /dev/null
+=================================
+memparse - Parse an option string
+=================================
+
+
+Copies files to a collection of memcached servers
+
+
+--------
+SYNOPSIS
+--------
+
+memparse [options] "option string"
+
+.. program:: memparse
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+:program:`memparse` can be used to validate an option string.
+
+-------
+OPTIONS
+-------
+
+For a full list of operations run the tool with the option:
+
+.. option:: --help
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://libmemcached.org/ <http://libmemcached.org/>`_
+
+
+------
+AUTHOR
+------
+
+
+Brian Aker, <brian@tangent.org>
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
+
--- /dev/null
+===============================================
+memping - Test to see if a server is available.
+===============================================
+
+
+--------
+SYNOPSIS
+--------
+
+memping [options] [server]
+
+.. program:: memping
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+:program:`memping` can be used to ping a memcached server to see if it is taking connections.
+
+-------
+OPTIONS
+-------
+
+
+You can specify servers via the option:
+
+.. option:: --servers
+
+or via the environment variable:
+
+.. envvar:: `MEMCACHED_SERVERS`
+
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+
+For a full list of operations run the tool with the option:
+
+.. option:: --help
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://libmemcached.org/ <http://libmemcached.org/>`_
+
+
+------
+AUTHOR
+------
+
+Brian Aker, <brian@tangent.org>
+
+--------
+SEE ALSO
+--------
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
--- /dev/null
+=========================
+memtouch - Touches a key.
+=========================
+
+
+--------
+SYNOPSIS
+--------
+
+memtouch [options] key
+
+.. program:: memtouch
+
+
+-----------
+DESCRIPTION
+-----------
+
+
+:program:`memtouch` does a "touch" on the specified key.
+
+-------
+OPTIONS
+-------
+
+
+You can specify servers via the option:
+
+.. option:: --servers
+
+or via the environment variable:
+
+.. envvar:: `MEMCACHED_SERVERS`
+
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+
+For a full list of operations run the tool with the option:
+
+.. option:: --help
+
+
+----
+HOME
+----
+
+
+To find out more information please check:
+`http://libmemcached.org/ <http://libmemcached.org/>`_
+
+
+------
+AUTHOR
+------
+
+Brian Aker, <brian@tangent.org>
+
+--------
+SEE ALSO
+--------
+
+
+:manpage:`memcached(1)` :manpage:`libmemcached(3)`
+
('bin/memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1),
('bin/memslap', 'memslap', u'libmemcached Documentation', [u'Brian Aker'], 1),
('bin/memstat', 'memstat', u'libmemcached Documentation', [u'Brian Aker'], 1),
+ ('bin/memexist', 'memexist', u'libmemcached Documentation', [u'Brian Aker'], 1),
+ ('bin/memparse', 'memparse', u'libmemcached Documentation', [u'Brian Aker'], 1),
+ ('bin/memping', 'memping', u'libmemcached Documentation', [u'Brian Aker'], 1),
+ ('bin/memtouch', 'memtouch', u'libmemcached Documentation', [u'Brian Aker'], 1),
]
bin/memslap
bin/memaslap
bin/memstat
+ bin/memexist.rst
+ bin/memparse.rst
+ bin/memping.rst
+ bin/memtouch.rst
----------
Libhashkit
the list) are not saved.
:c:func:`memcached_server_by_key()` allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult \*error. The returning structure should be freed with
-:c:func:`memcached_server_free()`.
+server which would be used for assignment.
:c:func:`memcached_server_get_last_disconnect()` returns a pointer to the last
server for which there was a connection problem. It does not mean this
void get_world(Framework *world)
{
+ if (getenv("LIBMEMCACHED_SERVER_NUMBER"))
+ {
+ int set_count= atoi(getenv("LIBMEMCACHED_SERVER_NUMBER"));
+ assert(set_count >= 0);
+ world->servers().set_count(set_count);
+ }
+ else
+ {
+ world->servers().set_count(8);
+ }
+
world->collections= collection;
world->_create= (test_callback_create_fn*)world_create;
#include <tests/libmemcached-1.0/generate.h>
#include <tests/libmemcached-1.0/fetch_all_results.h>
-#include "tests/libmemcached-1.0/servers_to_create.h"
#include "tests/libmemcached-1.0/callback_counter.h"
#include "clients/generator.h"
memcached_stat_st *stat_p= memcached_stat(memc, NULL, &rc);
test_true(stat_p);
- for (uint32_t host_index= 0; host_index < SERVERS_TO_CREATE; host_index++)
+ for (uint32_t host_index= 0; host_index < memcached_server_count(memc); host_index++)
{
/* This test was changes so that "make test" would work properlly */
if (DEBUG)
tests/libmemcached-1.0/generate.h \
tests/libmemcached-1.0/haldenbrand.h \
tests/libmemcached-1.0/mem_functions.h \
- tests/libmemcached-1.0/servers_to_create.h \
tests/libmemcached-1.0/setup_and_teardowns.h \
tests/libmemcached-1.0/stat.h \
tests/namespace.h \
#include "tests/hash_results.h"
-#include "tests/libmemcached-1.0/servers_to_create.h"
-
#include "tests/libmemcached-1.0/callback_counter.h"
#include "tests/libmemcached-1.0/fetch_all_results.h"
#include "tests/libmemcached-1.0/mem_functions.h"
+++ /dev/null
-/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
- * Libmemcached Client and Server
- *
- * Copyright (C) 2012 Data Differential, http://datadifferential.com/
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *
- * * The names of its contributors may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#pragma once
-#define SERVERS_TO_CREATE 5