+
+namespace libtest {
+
+libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port)
+{
+ return new Memcached(hostname, try_port, false);
+}
+
+libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port)
+{
+ return new Memcached(socket_file, try_port, true);
+}
+
+libtest::Server *build_memcached_light(const std::string& hostname, const in_port_t try_port)
+{
+ return new MemcachedLight(hostname, try_port);
+}
+
+
+libtest::Server *build_memcached_sasl(const std::string& hostname, const in_port_t try_port, const std::string& username, const std::string &password)
+{
+ if (username.empty())
+ {
+ return new MemcachedSaSL(hostname, try_port, false, "memcached", "memcached");
+ }
+
+ return new MemcachedSaSL(hostname, try_port, false, username, password);
+}
+
+libtest::Server *build_memcached_sasl_socket(const std::string& socket_file, const in_port_t try_port, const std::string& username, const std::string &password)
+{
+ if (username.empty())
+ {
+ return new MemcachedSaSL(socket_file, try_port, true, "memcached", "memcached");
+ }
+
+ return new MemcachedSaSL(socket_file, try_port, true, username, password);
+}
+
+}
+