Documentation ¶
Index ¶
- Constants
- Variables
- type Memcache
- func (mc *Memcache) ConnectionTimeout() time.Duration
- func (mc *Memcache) GapInStream(tcptuple *common.TcpTuple, dir uint8, nbytes int, private protos.ProtocolData) (priv protos.ProtocolData, drop bool)
- func (mc *Memcache) GetPorts() []int
- func (mc *Memcache) Init(testMode bool, results publish.Transactions) error
- func (mc *Memcache) InitDefaults()
- func (mc *Memcache) InitWithConfig(config config.Memcache, testMode bool, results publish.Transactions) error
- func (mc *Memcache) Parse(pkt *protos.Packet, tcptuple *common.TcpTuple, dir uint8, ...) protos.ProtocolData
- func (mc *Memcache) ParseUdp(pkt *protos.Packet)
- func (mc *Memcache) ReceivedFin(tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData) protos.ProtocolData
- type MemcacheHandler
Constants ¶
View Source
const ( MemcacheMagicRequest = 0x80 MemcacheMagicResponse = 0x81 )
View Source
const ( MemcacheUnknownType commandTypeCode = iota MemcacheLoadMsg MemcacheStoreMsg MemcacheDeleteMsg MemcacheCounterMsg MemcacheInfoMsg MemcacheSlabCtrlMsg MemcacheLruCrawlerMsg MemcacheStatsMsg MemcacheSuccessResp MemcacheFailResp MemcacheAuthMsg )
View Source
const ( MemcacheCmdUNKNOWN commandCode = iota MemcacheCmdNoOp MemcacheCmdSet MemcacheCmdAdd MemcacheCmdReplace MemcacheCmdAppend MemcacheCmdPrepend MemcacheCmdCas MemcacheCmdGet MemcacheCmdGets MemcacheCmdIncr MemcacheCmdDecr MemcacheResCounterOp MemcacheCmdTouch MemcacheCmdDelete MemcacheCmdSlabs MemcacheCmdSlabsReassign MemcacheCmdSlabsAutomove MemcacheCmdLru MemcacheCmdLruEnable MemcacheCmdLruDisable MemcacheCmdLruSleep MemcacheCmdLruToCrawl MemcacheCmdLruCrawl MemcacheCmdStats MemcacheResStat MemcacheCmdFlushAll MemcacheCmdVerbosity MemcacheCmdQuit MemcacheCmdVersion MemcacheCmdSaslList MemcacheCmdSaslAuth MemcacheCmdSaslStep MemcacheResOK MemcacheResValue MemcacheResEnd MemcacheResStored MemcacheResNotStored MemcacheResExists MemcacheResNotFound MemcacheResTouched MemcacheResDeleted MemcacheErrError MemcacheErrClientError MemcacheErrServerError MemcacheErrBusy MemcacheErrBadClass MemcacheErrNoSpare MemcacheErrNotFull MemcacheErrUnsafe MemcacheErrSame MemcacheResVersion )
Variables ¶
View Source
var ( ErrParserCaughtInError = errors.New("memcache parser caught in error loop") ErrParserUnknownCommand = errors.New("unknown memcache command found") ErrNoMoreArgument = errors.New("no more command arguments") ErrExpectedNumber = errors.New("expected number value") ErrExpectedNoReply = errors.New("expected noreply in argument list") ErrExpectedCRLF = errors.New("expected CRLF") ErrExpectedKeys = errors.New("message has no keys") )
memcache text parser errors
View Source
var ( ErrInvalidMemcacheMagic = errors.New("invalid memcache magic number") ErrLen = errors.New("length field error") )
memcache binary parser errors
View Source
var ( ErrInvalidMessage = errors.New("message is invalid") ErrMixOfBinaryAndText = errors.New("mix of binary and text in one connection") ErrResponseUnknownTransaction = errors.New("response from unknown transaction") ErrExpectedValueForMerge = errors.New("expected value to merge with") ErrExpectedStatsForMerge = errors.New("expected stat respose to merge with") )
memcache transaction/message errors
View Source
var ( NoteRequestPacketLoss = "Packet loss while capturing the request" NoteResponsePacketLoss = "Packet loss while capturing the response" NoteTransactionNoRequ = "Invalid transaction. Request missing" NoteNonQuietResponseOnly = "Missing response for non-quiet request" NoteTransUnfinished = "Unfinished transaction" )
internal notes to be published with transaction
View Source
var (
ErrNotImplemented = errors.New("not implemented")
)
View Source
var (
ErrUdpIncompleteMessage = errors.New("attempt to parse incomplete message failed")
)
memcache UDP errors
Functions ¶
This section is empty.
Types ¶
type Memcache ¶
type Memcache struct { Ports protos.PortsConfig // contains filtered or unexported fields }
memcache types
func (*Memcache) ConnectionTimeout ¶
func (*Memcache) GapInStream ¶
func (mc *Memcache) GapInStream( tcptuple *common.TcpTuple, dir uint8, nbytes int, private protos.ProtocolData, ) (priv protos.ProtocolData, drop bool)
GapInStream is called by TCP layer when a packets are missing from the tcp stream.
func (*Memcache) Init ¶
func (mc *Memcache) Init(testMode bool, results publish.Transactions) error
Called to initialize the Plugin
func (*Memcache) InitDefaults ¶
func (mc *Memcache) InitDefaults()
func (*Memcache) InitWithConfig ¶
func (*Memcache) Parse ¶
func (mc *Memcache) Parse( pkt *protos.Packet, tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData, ) protos.ProtocolData
Parse is called from TCP layer when payload data is available for parsing.
func (*Memcache) ReceivedFin ¶
func (mc *Memcache) ReceivedFin( tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData, ) protos.ProtocolData
ReceivedFin is called by tcp layer when the FIN flag is seen in the TCP stream.
type MemcacheHandler ¶
type MemcacheHandler interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.