syntax = "proto3";

package code.justin.tv.release.trace.common.memcached;
option go_package = "memcached";

enum Command {
  // Default value - unset. Probably an administrative
  // command like STAT.
  UNKNOWN_COMMAND = 0;

  // Set means "store this data."
  SET = 1;

  // Add means "store this data, but only if the server
  // doesn't already have data for this key."
  ADD = 2;

  // Replace means "store this data, but only if the
  // server *does* have data for this key."
  REPLACE = 3;

  // Append means "add this data to an existing key
  // after existing data." Append does not come with an
  // expiration time.
  APPEND = 4;

  // Prepend means "add this data to an existing key
  // before existing data." Prepend does not come with
  // an expiration time.
  PREPEND = 5;

  // Compare-and-set means "Store this data, if and only
  // if no one else has updated since I last fetched
  // it."
  CAS = 6;

  // Get retrieves one or more keys. If no_reply is set
  // to true, then the server will not respond in the
  // case of cache misses, so it is the client's
  // responsibility to match up which requested keys
  // actually got a VALUE response if they ask for
  // multiple keys at once.
  GET = 7;

  // Gets is like Get, but asks for the cas_unique to be
  // sent along with the response.
  GETS = 8;

  // Delete forcibly removes a key.
  DELETE = 9;

  // Incr means "increment this key by this amount." The
  // server returns the new value of the key.
  INCR = 10;

  // Decr means "decrement this key by this amount." The
  // server returns the new value of the key.
  DECR = 11;
}
