r52 - trunk/varnish-cache/include

phk at projects.linpro.no phk at projects.linpro.no
Wed Mar 15 21:34:10 CET 2006


Author: phk
Date: 2006-03-15 21:34:10 +0100 (Wed, 15 Mar 2006)
New Revision: 52

Added:
   trunk/varnish-cache/include/cli.h
Log:
Add definitions pertaining to the ascii-protocol which will be used
multiple different places in the varnish architecture.


Added: trunk/varnish-cache/include/cli.h
===================================================================
--- trunk/varnish-cache/include/cli.h	2006-03-14 12:54:13 UTC (rev 51)
+++ trunk/varnish-cache/include/cli.h	2006-03-15 20:34:10 UTC (rev 52)
@@ -0,0 +1,130 @@
+/*
+ * $Id$
+ */
+
+#define CLI_URL_QUERY							\
+	"url.query",							\
+	"url.query <url>",						\
+	"\tQuery the cache status of a specific URL.\n"			\
+	    "\tReturns the TTL, size and checksum of the object." 
+
+#define CLI_URL_PURGE							\
+	"url.purge",							\
+	"url.purge <regexp>",						\
+	"\tAll urls matching regexp will consider currently cached\n"	\
+	    "\tobjects obsolete"
+
+#define CLI_URL_STATUS							\
+	"url.status",							\
+	"url.status <url>",						\
+	"\tReturns all metadata for the specified URL"
+
+#define CLI_CONFIG_LOAD							\
+	"config.load",							\
+	"config.load <configname> <filename>",				\
+	"\tCompile and load the VCL file under the name provided."
+
+#define CLI_CONFIG_INLINE						\
+	"config.inline",						\
+	"config.inline <configname> <quoted_VCLstring>",		\
+	"\tCompile and load the VCL data under the name provided." 
+
+#define CLI_CONFIG_UNLOAD						\
+	"config.unload",						\
+	"config.unload <configname>",					\
+	"\tUnload the named configuration (when possible)."
+
+#define CLI_CONFIG_LIST							\
+	"config.list",							\
+	"config.list",							\
+	"\tList all loaded configuration."
+
+#define CLI_CONFIG_USE							\
+	"config.use",							\
+	"config.use <configname>",					\
+	"\tSwitch to the named configuration immediately."
+
+#define CLI_SERVER_FREEZE						\
+	"server.freeze",						\
+	"server.freeze",						\
+	"\tStop the clock, freeze object store."
+
+#define CLI_SERVER_THAW							\
+	"thaw",								\
+	"thaw",								\
+	"\tRestart the clock, unfreeze object store."
+
+#define CLI_SERVER_SUSPEND						\
+	"suspend",							\
+	"suspend",							\
+	"\tStop accepting requests."
+
+#define CLI_SERVER_RESUME						\
+	"resume",							\
+	"resume",							\
+	"\tAccept requests."
+
+#define CLI_SERVER_STOP							\
+	"stop",								\
+	"stop",								\
+	"\tStop the Varnish cache process"
+
+#define CLI_SERVER_START						\
+	"start",							\
+	"start",							\
+	"\tStart the Varnish cache process."
+
+#define CLI_SERVER_RESTART						\
+	"restart",							\
+	"restart",							\
+	"\tRestart the Varnish cache process."
+
+#define CLI_PING							\
+	"ping",								\
+	"ping [timestamp]",						\
+	"\tKeep connection alive"
+
+#define CLI_STATS							\
+	"stats",							\
+	"stats",							\
+	"\tShow summary statistics"
+
+#define CLI_ZERO							\
+	"zero",								\
+	"zero",								\
+	"\tZero summary statistics"
+
+#define CLI_HELP							\
+	"help",								\
+	"help [command]",						\
+	"\tShow command/protocol help"
+
+#define CLI_VERBOSE							\
+	"verbose",							\
+	"verbose",							\
+	"\tEnable/Disable verbosity"
+
+#define CLI_EXIT							\
+	"exit",								\
+	"exit",								\
+	"\tClose connection"
+
+#define CLI_QUIT							\
+	"quit",								\
+	"quit",								\
+	"\tClose connection"
+
+#define CLI_BYE								\
+	"bye",								\
+	"bye",								\
+	"\tClose connection"
+
+enum cli_status_e {
+	CLIS_SYNTAX	= 100,
+	CLIS_UNKNOWN	= 101,
+	CLIS_UNIMPL	= 102,
+	CLIS_TOOFEW	= 104,
+	CLIS_TOOMANY	= 105,
+	CLIS_PARAM	= 106,
+	CLIS_OK		= 200
+};




More information about the varnish-commit mailing list