proto

package
v0.0.0-...-2753770 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCommand

func ParseCommand(r io.Reader) (any, error)

Types

type Command

type Command byte
const (
	CmdGet Command = iota
	CmdSet
	CmdDelete
)

type CommandDelete

type CommandDelete struct {
	Key []byte
}

func (*CommandDelete) Bytes

func (c *CommandDelete) Bytes() []byte

type CommandGet

type CommandGet struct {
	Key []byte
}

func (*CommandGet) Bytes

func (c *CommandGet) Bytes() []byte

type CommandSet

type CommandSet struct {
	Key   []byte
	Value []byte
	TTL   int
}

func (*CommandSet) Bytes

func (c *CommandSet) Bytes() []byte

type ResponseDelete

type ResponseDelete struct {
	Status Status
}

func (*ResponseDelete) Bytes

func (r *ResponseDelete) Bytes() []byte

type ResponseGet

type ResponseGet struct {
	Status Status
	Value  []byte
}

func (*ResponseGet) Bytes

func (r *ResponseGet) Bytes() []byte

type ResponseSet

type ResponseSet struct {
	Status Status
}

func (*ResponseSet) Bytes

func (r *ResponseSet) Bytes() []byte

type Status

type Status byte
const (
	StatusOK Status = iota
	StatusError
	StatusNone
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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