protocol

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchedRequest

type BatchedRequest struct {
	Operations []Operation `msg:"operations"`
}

func (*BatchedRequest) DecodeMsg

func (z *BatchedRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchedRequest) EncodeMsg

func (z *BatchedRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchedRequest) MarshalMsg

func (z *BatchedRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchedRequest) Msgsize

func (z *BatchedRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchedRequest) UnmarshalMsg

func (z *BatchedRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type BatchedResponse

type BatchedResponse struct {
	Results []Result `msg:"results"`
}

func (*BatchedResponse) DecodeMsg

func (z *BatchedResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*BatchedResponse) EncodeMsg

func (z *BatchedResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*BatchedResponse) MarshalMsg

func (z *BatchedResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*BatchedResponse) Msgsize

func (z *BatchedResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*BatchedResponse) UnmarshalMsg

func (z *BatchedResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Operation

type Operation struct {
	Type  OperationType `msg:"type"`
	Key   []byte        `msg:"key"`
	Value []byte        `msg:"value"`
}

func (*Operation) DecodeMsg

func (z *Operation) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Operation) EncodeMsg

func (z *Operation) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Operation) Index

func (op Operation) Index() string

func (*Operation) MarshalMsg

func (z *Operation) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Operation) Msgsize

func (z *Operation) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Operation) UnmarshalMsg

func (z *Operation) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type OperationType

type OperationType int
const (
	SET OperationType = iota
	GET
	DELETE
	PING
)

func (*OperationType) DecodeMsg

func (z *OperationType) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (OperationType) EncodeMsg

func (z OperationType) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (OperationType) MarshalMsg

func (z OperationType) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (OperationType) Msgsize

func (z OperationType) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (OperationType) String

func (op OperationType) String() string

func (*OperationType) UnmarshalMsg

func (z *OperationType) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Result

type Result struct {
	Status  ResultStatus `msg:"status"`
	Message []byte       `msg:"message"`
}

func (*Result) DecodeMsg

func (z *Result) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Result) EncodeMsg

func (z *Result) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Result) MarshalMsg

func (z *Result) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Result) Msgsize

func (z *Result) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Result) UnmarshalMsg

func (z *Result) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ResultStatus

type ResultStatus int
const (
	SUCCESS ResultStatus = iota
	FAILURE
)

func (*ResultStatus) DecodeMsg

func (z *ResultStatus) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ResultStatus) EncodeMsg

func (z ResultStatus) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ResultStatus) MarshalMsg

func (z ResultStatus) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ResultStatus) Msgsize

func (z ResultStatus) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (ResultStatus) String

func (status ResultStatus) String() string

func (*ResultStatus) UnmarshalMsg

func (z *ResultStatus) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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