binary

package
v1.6.0-rc7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// RequestMagic says that memcache frame is a request
	RequestMagic = 0x80
	// ResponseMagic says that memcache frame is a response
	ResponseMagic = 0x81
)

Variables

View Source
var DeniedMsgBase = []byte{
	0x81, 0, 0, 0,
	0, 0, 0, 8,
	0, 0, 0, 0x0d,
	0, 0, 0, 0,
	0, 0, 0, 0,
	0, 0, 0, 0,
	'a', 'c', 'c',
	'e', 's', 's',
	' ', 'd', 'e',
	'n', 'i', 'e',
	'd'}

DeniedMsgBase is sent if policy denies the request. Exported for tests

Functions

This section is empty.

Types

type Parser

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

Parser implements proxylib.Parser

func (*Parser) OnData

func (p *Parser) OnData(reply, endStream bool, dataBuffers [][]byte) (proxylib.OpType, int)

OnData parses binary memcached data

type ParserFactory

type ParserFactory struct{}

ParserFactory implements proxylib.ParserFactory

var ParserFactoryInstance *ParserFactory

ParserFactoryInstance creates binary parser for unified parser

func (*ParserFactory) Create

func (p *ParserFactory) Create(connection *proxylib.Connection) proxylib.Parser

Create creates binary memcached parser

Jump to

Keyboard shortcuts

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