Commits

Alexey Kishkin committed d157a40

Add interface, remove links to ExtLib

  • Participants
  • Parent commits c745323

Comments (0)

Files changed (2)

 object(self)
    val host = host
    val port = port
-   val mutable i_channel = IO.input_channel stdin
-   val mutable o_channel = IO.output_channel stdout
+   val mutable i_channel =  stdin
+   val mutable o_channel =  stdout
    method operation_encode = function
       | Get -> 0x00
       | Set -> 0x01

File memcache.mli

+type operation =
+    Get
+  | Set
+  | Add
+  | Replace
+  | Delete
+  | Increment
+  | Decrement
+  | Quit
+  | Flush
+  | GetQ
+  | Noop
+  | Version
+  | GetK
+  | GetKQ
+  | Append
+  | Prepend
+  | Stat
+  | SetQ
+  | AddQ
+  | ReplaceQ
+  | DeleteQ
+  | IncrementQ
+  | DecrementQ
+  | QuitQ
+  | FlushQ
+  | AppendQ
+  | PrependQ
+type magic = Request | Response
+type response_status =
+    MC_No_error
+  | MC_Key_not_found
+  | MC_Key_exists
+  | MC_Value_too_large
+  | MC_Invalid_argument
+  | MC_Item_not_stored
+  | MC_Unknown_comamnd
+  | MC_Out_of_memory
+exception Bad_memcache_format of string
+val set_i8 : Buffer.t -> int -> unit
+val set_i16 : Buffer.t -> int -> unit
+val set_i32 : Buffer.t -> int -> unit
+val set_int32 : Buffer.t -> int32 -> unit
+val set_int64 : Buffer.t -> int64 -> unit
+val get_i8 : string -> int -> int
+val get_i16 : string -> int -> int
+val get_i32 : string -> int -> int
+val get_int32 : string -> int -> int32
+val get_int64 : string -> int -> int64
+class memcache_connector :
+  string ->
+  int ->
+  object
+    val host : string
+    val mutable i_channel : in_channel
+    val mutable o_channel : out_channel
+    val port : int
+    method decode_packet :
+      string -> response_status * string * string * string * int * int64
+    method encode_packet :
+      operation -> string -> string -> string -> int -> int64 -> string
+    method magic_code_decode : int -> magic
+    method magic_code_encode : magic -> int
+    method operation_encode : operation -> int
+    method response_status_decode : int -> response_status
+  end