memcached

package
v0.0.0-...-449f243 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMemcachedConn

func InitMemcachedConn(server string) error

InitMemcachedConn init a pool of memcached workers

func NewHandler

func NewHandler() (handlers.Handler, error)

NewHandler return a memcached handler

Types

type GetTask

type GetTask struct {
	Cmd      common.GetRequest
	DataOut  chan common.GetResponse
	ErrorOut chan error
}

GetTask a get task that can be processed by workers

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is an handler for executing memcached requests

func (*Handler) Add

func (h *Handler) Add(cmd common.SetRequest) error

Add perform an add request: Not implemented

func (*Handler) Append

func (h *Handler) Append(cmd common.SetRequest) error

Append perform an append: Not implemented

func (*Handler) Close

func (h *Handler) Close() error

Close the handler

func (*Handler) Delete

func (h *Handler) Delete(cmd common.DeleteRequest) error

Delete perform a delete request: Not implemented

func (*Handler) GAT

GAT perform a gat request: Not implemented

func (*Handler) Get

func (h *Handler) Get(cmd common.GetRequest) (<-chan common.GetResponse, <-chan error)

Get perform a get request

func (*Handler) GetE

func (h *Handler) GetE(cmd common.GetRequest) (<-chan common.GetEResponse, <-chan error)

GetE perform a gete request: Not implemented

func (*Handler) Prepend

func (h *Handler) Prepend(cmd common.SetRequest) error

Prepend perform a prepend: Not implemented

func (*Handler) Replace

func (h *Handler) Replace(cmd common.SetRequest) error

Replace perform a replace: Not implemented

func (*Handler) Set

func (h *Handler) Set(cmd common.SetRequest) error

Set perform a set request

func (*Handler) Touch

func (h *Handler) Touch(cmd common.TouchRequest) error

Touch perform a touch request: Not implemented

type Pool

type Pool struct {
	GetWorkQueue chan GetTask
	SetWorkQueue chan SetTask
	// contains filtered or unexported fields
}

Pool describe a pool for memcached connectors

func NewPool

func NewPool(memcached string, workers, queueSize int) Pool

NewPool return a pool of worker and chans to interact with

type SetTask

type SetTask struct {
	Cmd      common.SetRequest
	ErrorOut chan error
}

SetTask a set task that can be processed by workers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL