Documentation ¶
Index ¶
- Variables
- 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 ¶
var ( MetricCmdSetErrorsOOM = metrics.AddCounter("cmd_set_errors_oom", nil) MetricCmdSetErrorsOOML1 = metrics.AddCounter("cmd_set_errors_oom_l1", nil) MetricCmdSetErrorsOOML2 = metrics.AddCounter("cmd_set_errors_oom_l2", nil) MetricCmdTouchMissesMeta = metrics.AddCounter("cmd_touch_misses_meta", nil) MetricCmdTouchMissesMetaL1 = metrics.AddCounter("cmd_touch_misses_meta_l1", nil) MetricCmdTouchMissesMetaL2 = metrics.AddCounter("cmd_touch_misses_meta_l2", nil) MetricCmdTouchMissesChunk = metrics.AddCounter("cmd_touch_misses_chunk", nil) MetricCmdTouchMissesChunkL1 = metrics.AddCounter("cmd_touch_misses_chunk_l1", nil) MetricCmdTouchMissesChunkL2 = metrics.AddCounter("cmd_touch_misses_chunk_l2", nil) MetricCmdTouchMetaSet = metrics.AddCounter("cmd_touch_meta_set", nil) MetricCmdTouchMetaSetL1 = metrics.AddCounter("cmd_touch_meta_set_l1", nil) MetricCmdTouchMetaSetL2 = metrics.AddCounter("cmd_touch_meta_set_l2", nil) MetricCmdTouchMetaSetErrors = metrics.AddCounter("cmd_touch_meta_set_errors", nil) MetricCmdTouchMetaSetErrorsL1 = metrics.AddCounter("cmd_touch_meta_set_errors_l1", nil) MetricCmdTouchMetaSetErrorsL2 = metrics.AddCounter("cmd_touch_meta_set_errors_l2", nil) MetricCmdTouchMetaSetSuccesses = metrics.AddCounter("cmd_touch_meta_set_successes", nil) MetricCmdTouchMetaSetSuccessesL1 = metrics.AddCounter("cmd_touch_meta_set_successes_l1", nil) MetricCmdTouchMetaSetSuccessesL2 = metrics.AddCounter("cmd_touch_meta_set_successes_l2", nil) MetricCmdDeleteMissesMeta = metrics.AddCounter("cmd_delete_misses_meta", nil) MetricCmdDeleteMissesMetaL1 = metrics.AddCounter("cmd_delete_misses_meta_l1", nil) MetricCmdDeleteMissesMetaL2 = metrics.AddCounter("cmd_delete_misses_meta_l2", nil) MetricCmdDeleteMissesChunk = metrics.AddCounter("cmd_delete_misses_chunk", nil) MetricCmdDeleteMissesChunkL1 = metrics.AddCounter("cmd_delete_misses_chunk_l1", nil) MetricCmdDeleteMissesChunkL2 = metrics.AddCounter("cmd_delete_misses_chunk_l2", nil) MetricCmdGetMissesMeta = metrics.AddCounter("cmd_get_misses_meta", nil) MetricCmdGetMissesMetaL1 = metrics.AddCounter("cmd_get_misses_meta_l1", nil) MetricCmdGetMissesMetaL2 = metrics.AddCounter("cmd_get_misses_meta_l2", nil) MetricCmdGetMissesChunk = metrics.AddCounter("cmd_get_misses_chunk", nil) MetricCmdGetMissesChunkL1 = metrics.AddCounter("cmd_get_misses_chunk_l1", nil) MetricCmdGetMissesChunkL2 = metrics.AddCounter("cmd_get_misses_chunk_l2", nil) MetricCmdGetMissesToken = metrics.AddCounter("cmd_get_misses_token", nil) MetricCmdGetMissesTokenL1 = metrics.AddCounter("cmd_get_misses_token_l1", nil) MetricCmdGetMissesTokenL2 = metrics.AddCounter("cmd_get_misses_token_l2", nil) MetricCmdGatMissesMeta = metrics.AddCounter("cmd_gat_misses_meta", nil) MetricCmdGatMissesMetaL1 = metrics.AddCounter("cmd_gat_misses_meta_l1", nil) MetricCmdGatMissesMetaL2 = metrics.AddCounter("cmd_gat_misses_meta_l2", nil) MetricCmdGatMissesChunk = metrics.AddCounter("cmd_gat_misses_chunk", nil) MetricCmdGatMissesChunkL1 = metrics.AddCounter("cmd_gat_misses_chunk_l1", nil) MetricCmdGatMissesChunkL2 = metrics.AddCounter("cmd_gat_misses_chunk_l2", nil) MetricCmdGatMissesToken = metrics.AddCounter("cmd_gat_misses_token", nil) MetricCmdGatMissesTokenL1 = metrics.AddCounter("cmd_gat_misses_token_l1", nil) MetricCmdGatMissesTokenL2 = metrics.AddCounter("cmd_gat_misses_token_l2", nil) MetricCmdAppendMissesMeta = metrics.AddCounter("cmd_append_misses_meta", nil) MetricCmdAppendMissesMetaL1 = metrics.AddCounter("cmd_append_misses_meta_l1", nil) MetricCmdAppendMissesMetaL2 = metrics.AddCounter("cmd_append_misses_meta_l2", nil) MetricCmdAppendMissesChunk = metrics.AddCounter("cmd_append_misses_chunk", nil) MetricCmdAppendMissesChunkL1 = metrics.AddCounter("cmd_append_misses_chunk_l1", nil) MetricCmdAppendMissesChunkL2 = metrics.AddCounter("cmd_append_misses_chunk_l2", nil) MetricCmdAppendMissesToken = metrics.AddCounter("cmd_append_misses_token", nil) MetricCmdAppendMissesTokenL1 = metrics.AddCounter("cmd_append_misses_token_l1", nil) MetricCmdAppendMissesTokenL2 = metrics.AddCounter("cmd_append_misses_token_l2", nil) MetricCmdPrependMissesMeta = metrics.AddCounter("cmd_prepend_misses_meta", nil) MetricCmdPrependMissesMetaL1 = metrics.AddCounter("cmd_prepend_misses_meta_l1", nil) MetricCmdPrependMissesMetaL2 = metrics.AddCounter("cmd_prepend_misses_meta_l2", nil) MetricCmdPrependMissesChunk = metrics.AddCounter("cmd_prepend_misses_chunk", nil) MetricCmdPrependMissesChunkL1 = metrics.AddCounter("cmd_prepend_misses_chunk_l1", nil) MetricCmdPrependMissesChunkL2 = metrics.AddCounter("cmd_prepend_misses_chunk_l2", nil) MetricCmdPrependMissesToken = metrics.AddCounter("cmd_prepend_misses_token", nil) MetricCmdPrependMissesTokenL1 = metrics.AddCounter("cmd_prepend_misses_token_l1", nil) MetricCmdPrependMissesTokenL2 = metrics.AddCounter("cmd_prepend_misses_token_l2", nil) )
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 special interaction with the memcached server to pack data into fixed-size chunks in order to store either very large objects or to avoid memory fragmentation overhead when data sizes rapidly change.
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