.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "Feb 01, 2024" "1.1" "libmemcached-awesome" .SH NAME libmemcached_check_configuration \- libmemcached Documentation .SH SYNOPSIS .INDENT 0.0 .TP .B #include Compile and link with \-lmemcached .UNINDENT .INDENT 0.0 .TP .B \fI\%memcached_st\fP *memcached(const char *string, size_t string_length) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBstring\fP \-\- configuration string .IP \(bu 2 \fBstring_length\fP \-\- length of the configuration string without any terminating zero .UNINDENT .TP .B Returns allocated and initialized \fI\%memcached_st\fP struct .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%memcached_return_t\fP libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBoption_string\fP \-\- configuration string .IP \(bu 2 \fBlength\fP \-\- length of the configuration string without any terminating zero .IP \(bu 2 \fBerror_buffer\fP \-\- buffer used to store any error message .IP \(bu 2 \fBerror_buffer_size\fP \-\- available size of the \fI\%error_buffer\fP .UNINDENT .TP .B Returns \fI\%memcached_return_t\fP indicating success .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBlibmemcached\fP implements a custom language for configuring and modifying servers. By passing in an option string you can generate a \fI\%memcached_st\fP object that you can use in your application directly. .SS General Options: .INDENT 0.0 .TP .B \-\-SERVER=:/? Provide a servername to be used by the client. .sp Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1. .UNINDENT .INDENT 0.0 .TP .B \-\-SOCKET=\e\(dq/?\e\(dq Provide a filepath to a UNIX socket file. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1. .UNINDENT .INDENT 0.0 .TP .B \-\-VERIFY\-KEY Verify that keys that are being used fit within the design of the protocol being used. .UNINDENT .INDENT 0.0 .TP .B \-\-REMOVE_FAILED_SERVERS Enable the behavior \fI\%MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-BINARY\-PROTOCOL Force all connections to use the binary protocol. .UNINDENT .INDENT 0.0 .TP .B \-\-BUFFER\-REQUESTS Please see \fI\%MEMCACHED_BEHAVIOR_BUFFER_REQUESTS\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-CONFIGURE\-FILE= Provide a configuration file to be used to load requests. Beware that by using a configuration file \fBlibmemcached\fP will reset \fI\%memcached_st\fP based on information only contained in the file. .UNINDENT .INDENT 0.0 .TP .B \-\-CONNECT\-TIMEOUT= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-DISTRIBUTION= Set the distribution model used by the client. See \fI\%memcached_behavior_set()\fP for more details. .UNINDENT .INDENT 0.0 .TP .B \-\-HASH= Set the hashing algorithm used for placing keys on servers. .UNINDENT .INDENT 0.0 .TP .B \-\-HASH\-WITH\-NAMESPACE When enabled the prefix key will be added to the key when determining which server to store the data in. .UNINDENT .INDENT 0.0 .TP .B \-\-NOREPLY Enable \(dqno reply\(dq for all calls that support this. It is highly recommended that you use this option with the binary protocol only. .UNINDENT .INDENT 0.0 .TP .B \-\-NUMBER\-OF\-REPLICAS= Set the number of servers that keys will be replicated to. .UNINDENT .INDENT 0.0 .TP .B \-\-RANDOMIZE\-REPLICA\-READ Select randomly the server within the replication pool to read from. .UNINDENT .INDENT 0.0 .TP .B \-\-SORT\-HOSTS When adding new servers always calculate their distribution based on sorted naming order. .UNINDENT .INDENT 0.0 .TP .B \-\-SUPPORT\-CAS See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_SUPPORT_CAS\fP .UNINDENT .INDENT 0.0 .TP .B \-\-USE\-UDP See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_USE_UDP\fP .UNINDENT .INDENT 0.0 .TP .B \-\-NAMESPACE= A namespace is a container that provides context for keys, only other requests that know the namespace can access these values. This is accomplished by prepending the namespace value to all keys. .UNINDENT .SS Memcached Pool Options: .INDENT 0.0 .TP .B \-\-POOL\-MIN Initial size of pool. .UNINDENT .INDENT 0.0 .TP .B \-\-POOL\-MAX Maximize size of the pool. .UNINDENT .SS I/O Options: .INDENT 0.0 .TP .B \-\-TCP\-NODELAY See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_TCP_NODELAY\fP .UNINDENT .INDENT 0.0 .TP .B \-\-TCP\-KEEPALIVE See \fI\%memcached_behavior_set()\fP for \fBMEMCACHED_BEHAVIOR_TCP_KEEPALIVE\fP .UNINDENT .INDENT 0.0 .TP .B \-\-RETRY\-TIMEOUT= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_RETRY_TIMEOUT\fP .UNINDENT .INDENT 0.0 .TP .B \-\-SERVER\-FAILURE\-LIMIT= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT\fP .UNINDENT .INDENT 0.0 .TP .B \-\-SND\-TIMEOUT= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_SND_TIMEOUT\fP .UNINDENT .INDENT 0.0 .TP .B \-\-SOCKET\-RECV\-SIZE= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE\fP .UNINDENT .INDENT 0.0 .TP .B \-\-SOCKET\-SEND\-SIZE= See \fI\%memcached_behavior_set()\fP for \fI\%MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE\fP .UNINDENT .INDENT 0.0 .TP .B \-\-POLL\-TIMEOUT= Set the timeout used by \fBpoll(3)\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-IO\-BYTES\-WATERMARK= .UNINDENT .INDENT 0.0 .TP .B \-\-IO\-KEY\-PREFETCH= .UNINDENT .INDENT 0.0 .TP .B \-\-IO\-MSG\-WATERMARK= .UNINDENT .INDENT 0.0 .TP .B \-\-TCP\-KEEPIDLE .UNINDENT .INDENT 0.0 .TP .B \-\-RCV\-TIMEOUT= .UNINDENT .SS Other Options: .INDENT 0.0 .TP .B INCLUDE Include a file in configuration. Unlike \fB\-\-CONFIGURE\-FILE=\fP this will not reset \fI\%memcached_st\fP\&. .UNINDENT .INDENT 0.0 .TP .B RESET Reset \fI\%memcached_st\fP and continue to process. .UNINDENT .INDENT 0.0 .TP .B END End configuration processing. .UNINDENT .INDENT 0.0 .TP .B ERROR End configuration processing and throw an error. .UNINDENT .SH ENVIRONMENT .INDENT 0.0 .TP .B LIBMEMCACHED .UNINDENT .SH RETURN VALUE .sp \fI\%memcached()\fP returns a pointer to the \fI\%memcached_st\fP that was created (or initialized). On an allocation failure, it returns NULL. .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .EX const char *config_string= \(dq\-\-SERVER=host10.example.com \(dq \(dq\-\-SERVER=host11.example.com \(dq \(dq\-\-SERVER=host10.example.com\(dq; memcached_st *memc= memcached(config_string, strlen(config_string)); { // ... } memcached_free(memc); .EE .UNINDENT .UNINDENT .SH SEE ALSO .sp \fBmemcached(1)\fP \fBlibmemcached(3)\fP \fBmemcached_strerror(3)\fP .\" Generated by docutils manpage writer. .