types

package
v0.0.0-...-8eef2bf Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID uint32

func (ID) String

func (id ID) String() string

func (ID) UInt32

func (id ID) UInt32() uint32

type ReqType

type ReqType int32
const (
	REQ_TYPE_GET ReqType = iota
	REQ_TYPE_PUT
	REQ_TYPE_HAS
	REQ_TYPE_DEL
	REQ_TYPE_FLUSH
	REQ_TYPE_BATCH_NEW
	REQ_TYPE_BATCH_PUT
	REQ_TYPE_BATCH_DEL
	REQ_TYPE_BATCH_WRITE
	REQ_TYPE_BATCH_RESET
	REQ_TYPE_BATCH_CLOSE
	REQ_TYPE_ITER_NEW
	REQ_TYPE_ITER_NEXT
	REQ_TYPE_ITER_KEY
	REQ_TYPE_ITER_VAL
	REQ_TYPE_ITER_ERROR
	REQ_TYPE_ITER_CLOSE
	REQ_TYPE_SNAP_NEW
	REQ_TYPE_SNAP_HAS
	REQ_TYPE_SNAP_GET
	REQ_TYPE_SNAP_RELEASE
	REQ_TYPE_SEQ_GET
)

type Request

type Request struct {
	Type ReqType
	Key  []byte
	Val  []byte
	Id   ID
}

func (*Request) Marshal

func (req *Request) Marshal() []byte

func (*Request) Unmarshal

func (req *Request) Unmarshal(data []byte) error

type Response

type Response struct {
	Code  uint32
	Val   []byte
	Id    ID
	Exist bool
}

func (*Response) Marshal

func (rsp *Response) Marshal() []byte

func (*Response) Unmarshal

func (rsp *Response) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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