Documentation ¶
Index ¶
- type Handler
- func (h Handler) Add(cmd common.SetRequest) error
- func (h Handler) Append(cmd common.SetRequest) error
- func (h Handler) Close() error
- func (h Handler) Delete(cmd common.DeleteRequest) error
- func (h Handler) GAT(cmd common.GATRequest) (common.GetResponse, error)
- func (h Handler) Get(cmd common.GetRequest) (<-chan common.GetResponse, <-chan error)
- func (h Handler) GetE(cmd common.GetRequest) (<-chan common.GetEResponse, <-chan error)
- func (h Handler) Prepend(cmd common.SetRequest) error
- func (h Handler) Replace(cmd common.SetRequest) error
- func (h Handler) Set(cmd common.SetRequest) error
- func (h Handler) Touch(cmd common.TouchRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements a backend for Rend that communicates to a remote memcached server
func NewHandler ¶
func NewHandler(conn io.ReadWriteCloser) Handler
NewHandler returns an implementation of handlers.Handler that implements a straightforward request-response like normal memcached usage.
func (Handler) Add ¶
func (h Handler) Add(cmd common.SetRequest) error
Add performs an add request on the remote backend
func (Handler) Append ¶
func (h Handler) Append(cmd common.SetRequest) error
Append performs an append request on the remote backend
func (Handler) Close ¶
Close closes the Handler's underlying io.ReadWriteCloser. Any calls to the handler after Close is called are invalid.
func (Handler) Delete ¶
func (h Handler) Delete(cmd common.DeleteRequest) error
Delete performs a delete request on the remote backend
func (Handler) GAT ¶
func (h Handler) GAT(cmd common.GATRequest) (common.GetResponse, error)
GAT performs a get-and-touch request on the remote backend
func (Handler) Get ¶
func (h Handler) Get(cmd common.GetRequest) (<-chan common.GetResponse, <-chan error)
Get performs a batched get request on the remote backend. The channels returned are expected to be read from until either a single error is received or the response channel is exhausted.
func (Handler) GetE ¶
func (h Handler) GetE(cmd common.GetRequest) (<-chan common.GetEResponse, <-chan error)
GetE performs a batched gete request on the remote backend. The channels returned are expected to be read from until either a single error is received or the response channel is exhausted.
func (Handler) Prepend ¶
func (h Handler) Prepend(cmd common.SetRequest) error
Prepend performs a prepend request on the remote backend
func (Handler) Replace ¶
func (h Handler) Replace(cmd common.SetRequest) error
Replace performs a replace request on the remote backend