Documentation ¶
Overview ¶
Package memcached provides useful functions for building your own memcached server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleIO ¶
func HandleIO(s io.ReadWriteCloser, handler RequestHandler) error
HandleIO until the handler returns a fatal message or a read or write on the socket fails.
func HandleMessage ¶
HandleMessage to handle an individual message.
Types ¶
type RequestHandler ¶
type RequestHandler interface { // Handle a message from the client. // If the message should cause the connection to terminate, // the Fatal flag should be set. If the message requires no // response, return nil // // Most clients should ignore the io.Writer unless they want // complete control over the response. HandleMessage(io.Writer, *transport.MCRequest) *transport.MCResponse }
RequestHandler for doing server stuff.
func FuncHandler ¶
func FuncHandler(f func(io.Writer, *transport.MCRequest) *transport.MCResponse) RequestHandler
FuncHandler to convert a request handler function as a RequestHandler.
Click to show internal directories.
Click to hide internal directories.