memdproto

package module
v0.0.0-...-b5ceec6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 11 Imported by: 0

README

github.com/lestrrat-go/memdproto

github.com/lestrrat-go/memdproto is package that implements the memcached protocol, namely parsing and formatting memcached requests and responses. This package does NOT implement the memcached functionality.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCmd

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

func NewAddCmd

func NewAddCmd(key string, value []byte) *AddCmd

func (*AddCmd) Reset

func (cmd *AddCmd) Reset() *AddCmd

func (*AddCmd) SetExpires

func (cmd *AddCmd) SetExpires(expires int64) *storageCmd

func (*AddCmd) SetFlags

func (cmd *AddCmd) SetFlags(flags uint16) *storageCmd

func (*AddCmd) SetNoReply

func (cmd *AddCmd) SetNoReply(noreply bool) *storageCmd

func (*AddCmd) UnmarshalText

func (cmd *AddCmd) UnmarshalText(data []byte) error

func (*AddCmd) WriteTo

func (cmd *AddCmd) WriteTo(dst io.Writer) (int64, error)

type AppendCmd

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

func NewAppendCmd

func NewAppendCmd(key string, value []byte) *AppendCmd

func (*AppendCmd) Reset

func (cmd *AppendCmd) Reset() *AppendCmd

func (*AppendCmd) SetExpires

func (cmd *AppendCmd) SetExpires(expires int64) *storageCmd

func (*AppendCmd) SetFlags

func (cmd *AppendCmd) SetFlags(flags uint16) *storageCmd

func (*AppendCmd) SetNoReply

func (cmd *AppendCmd) SetNoReply(noreply bool) *storageCmd

func (*AppendCmd) UnmarshalText

func (cmd *AppendCmd) UnmarshalText(data []byte) error

func (*AppendCmd) WriteTo

func (cmd *AppendCmd) WriteTo(dst io.Writer) (int64, error)

type CasCmd

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

func NewCasCmd

func NewCasCmd(key string, value []byte, cas uint64) *CasCmd

func (*CasCmd) Reset

func (cmd *CasCmd) Reset() *CasCmd

func (*CasCmd) SetCas

func (cmd *CasCmd) SetCas(cas uint64) *CasCmd

func (*CasCmd) SetExpires

func (cmd *CasCmd) SetExpires(expires int64) *storageCmd

func (*CasCmd) SetFlags

func (cmd *CasCmd) SetFlags(flags uint16) *storageCmd

func (*CasCmd) SetNoReply

func (cmd *CasCmd) SetNoReply(noreply bool) *storageCmd

func (*CasCmd) UnmarshalText

func (cmd *CasCmd) UnmarshalText(data []byte) error

func (*CasCmd) WriteTo

func (cmd *CasCmd) WriteTo(dst io.Writer) (int64, error)

type Cmd

type Cmd interface {
	io.WriterTo
	encoding.TextUnmarshaler
}

type DeleteCmd

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

func (*DeleteCmd) SetNoReply

func (cmd *DeleteCmd) SetNoReply(noreply bool) *DeleteCmd

func (*DeleteCmd) WriteTo

func (cmd *DeleteCmd) WriteTo(dst io.Writer) (int64, error)

type FlagCompareCas

type FlagCompareCas uint64

func (*FlagCompareCas) WriteTo

func (f *FlagCompareCas) WriteTo(dst io.Writer) (int64, error)

type FlagDontRecache

type FlagDontRecache struct{}

func (*FlagDontRecache) WriteTo

func (f *FlagDontRecache) WriteTo(dst io.Writer) (int64, error)

type FlagInvalidateOnOldCas

type FlagInvalidateOnOldCas struct{}

func (*FlagInvalidateOnOldCas) WriteTo

func (f *FlagInvalidateOnOldCas) WriteTo(dst io.Writer) (int64, error)

type FlagKeyAsBase64

type FlagKeyAsBase64 struct{}

FlagKeyAsBase64 is a flag used in Meta Commands to indicate if the key used should be treated as a base64 encoded string

func (*FlagKeyAsBase64) WriteTo

func (f *FlagKeyAsBase64) WriteTo(dst io.Writer) (int64, error)

type FlagNoReply

type FlagNoReply struct{}

func (*FlagNoReply) WriteTo

func (f *FlagNoReply) WriteTo(dst io.Writer) (int64, error)

type FlagOpaque

type FlagOpaque []byte

FlagOpague is a flag used in Meta Commands to send and receive opaque value

func (FlagOpaque) WriteTo

func (f FlagOpaque) WriteTo(dst io.Writer) (int64, error)

type FlagRecache

type FlagRecache uint64

func (*FlagRecache) WriteTo

func (f *FlagRecache) WriteTo(dst io.Writer) (int64, error)

type FlagRecacheResult

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

func (*FlagRecacheResult) WriteTo

func (f *FlagRecacheResult) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveCas

type FlagRetrieveCas uint64

FlagRetrieveCas is a flag used in Meta Commands for operations regarding retrieval of a CAS value for an item.

When used in a request, it indicates that the client wants to retrieve the CAS value for the item. When used in a response, it is suffixed with the actual CAS value

func (*FlagRetrieveCas) WriteTo

func (f *FlagRetrieveCas) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveClientFlags

type FlagRetrieveClientFlags uint32

FlagRetrieveClientFlags is a flag used in Meta Commands for operations regarding retrieval of client flags for an item.

When used in a request, it indicates that the client wants to retrieve the client flags for the item. When used in a response, it is suffixed with the actual client flags

func (*FlagRetrieveClientFlags) WriteTo

func (f *FlagRetrieveClientFlags) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveKey

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

func (*FlagRetrieveKey) WriteTo

func (f *FlagRetrieveKey) WriteTo(dst io.Writer) (int64, error)

type FlagRetrievePreviousHit

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

FlagRetrieveExpiry is a flag used in Meta Commands for operations to retrieve if the item has been hit before this action.

When used in a request, it indicates that the client wants to retrieve the "has been hit?" value for the item. When used in a response, it is suffixed with either a 0 or 1 to indicate the "has been hit?" value.

func (*FlagRetrievePreviousHit) WriteTo

func (f *FlagRetrievePreviousHit) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveRemainingTTL

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

func (*FlagRetrieveRemainingTTL) WriteTo

func (f *FlagRetrieveRemainingTTL) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveSize

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

func (*FlagRetrieveSize) WriteTo

func (f *FlagRetrieveSize) WriteTo(dst io.Writer) (int64, error)

type FlagRetrieveTimeSinceLastAccess

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

func (*FlagRetrieveTimeSinceLastAccess) WriteTo

type FlagRetrieveValue

type FlagRetrieveValue struct{}

func (*FlagRetrieveValue) WriteTo

func (f *FlagRetrieveValue) WriteTo(dst io.Writer) (int64, error)

type FlagSetClientFlags

type FlagSetClientFlags uint32

func (*FlagSetClientFlags) WriteTo

func (f *FlagSetClientFlags) WriteTo(dst io.Writer) (int64, error)

type FlagSetTTL

type FlagSetTTL int64

func (*FlagSetTTL) WriteTo

func (f *FlagSetTTL) WriteTo(dst io.Writer) (int64, error)

type FlagSkipLRUBump

type FlagSkipLRUBump struct{}

func (*FlagSkipLRUBump) WriteTo

func (f *FlagSkipLRUBump) WriteTo(dst io.Writer) (int64, error)

type FlagStale

type FlagStale struct{}

func (*FlagStale) WriteTo

func (f *FlagStale) WriteTo(dst io.Writer) (int64, error)

type FlagUpdateTTL

type FlagUpdateTTL int64

func (*FlagUpdateTTL) WriteTo

func (f *FlagUpdateTTL) WriteTo(dst io.Writer) (int64, error)

type FlagVivifyOnMiss

type FlagVivifyOnMiss uint64

func (*FlagVivifyOnMiss) WriteTo

func (f *FlagVivifyOnMiss) WriteTo(dst io.Writer) (int64, error)

type GetCmd

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

func NewGetCmd

func NewGetCmd(keys ...string) *GetCmd

Creates a new GetCmd with the specified keys.

You can use the GetCmd to issue either `get` or `gets` commands, depending on the value of the `cas` parameter (which in turn can be set using the `SetRetrieveCas` method).

It is possible for this object to contain 0 keys, but the `WriteTo` method will return an error if there are no keys specified.

func (*GetCmd) AddKeys

func (cmd *GetCmd) AddKeys(keys ...string) *GetCmd

AddKeys adds the specified keys to the command.

It is safe to call this method concurrently with other methods on this object.

func (*GetCmd) Keys

func (cmd *GetCmd) Keys() []string

Keys returns the keys associated with this command.

It is safe to call this method concurrently with other methods on this object.

func (*GetCmd) Reset

func (cmd *GetCmd) Reset() *GetCmd

Reset clears the command. The keys and cas fields are reset to their zero values.

It is safe to call this method concurrently with other methods on this object.

func (*GetCmd) SetRetrieveCas

func (cmd *GetCmd) SetRetrieveCas(b bool) *GetCmd

SetRetrieveCas sets whether or not the `gets` command should be used. If `cas` is true, the `gets` command will be used, otherwise the `get` command will be used.

It is safe to call this method concurrently with other methods on this object.

func (*GetCmd) UnmarshalText

func (cmd *GetCmd) UnmarshalText(data []byte) error

UnmarshalText parses the specified data and populates the command appropriately

It is safe to call this method concurrently with other methods on this object.

func (*GetCmd) WriteTo

func (cmd *GetCmd) WriteTo(dst io.Writer) (int64, error)

WriteTo writes the command to the specified writer. If there are no keys specified, this method will return an error.

It is safe to call this method concurrently with other methods on this object.

type GetReply

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

func NewGetReply

func NewGetReply() *GetReply

func (*GetReply) AddItems

func (reply *GetReply) AddItems(items ...*GetReplyItem) *GetReply

func (*GetReply) UnmarshalText

func (reply *GetReply) UnmarshalText(data []byte) error

func (*GetReply) WriteTo

func (reply *GetReply) WriteTo(dst io.Writer) (int64, error)

type GetReplyItem

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

func NewGetReplyItem

func NewGetReplyItem(key string, value []byte) *GetReplyItem

func (*GetReplyItem) SetCas

func (item *GetReplyItem) SetCas(cas uint64) *GetReplyItem

func (*GetReplyItem) SetFlags

func (item *GetReplyItem) SetFlags(flags uint16) *GetReplyItem

type MetaDeleteCmd

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

func NewMetaDeleteCmd

func NewMetaDeleteCmd(key string) *MetaDeleteCmd

func (*MetaDeleteCmd) Key

func (cmd *MetaDeleteCmd) Key() string

func (*MetaDeleteCmd) SetCompareCas

func (cmd *MetaDeleteCmd) SetCompareCas(cas uint64) *MetaDeleteCmd

func (*MetaDeleteCmd) SetInvalidateOnOldCas

func (cmd *MetaDeleteCmd) SetInvalidateOnOldCas(v bool) *MetaDeleteCmd

func (*MetaDeleteCmd) SetKeyAsBase64

func (cmd *MetaDeleteCmd) SetKeyAsBase64(b64 bool) *MetaDeleteCmd

func (*MetaDeleteCmd) SetNoReply

func (cmd *MetaDeleteCmd) SetNoReply(noreply bool) *MetaDeleteCmd

func (*MetaDeleteCmd) SetOpaque

func (cmd *MetaDeleteCmd) SetOpaque(opaque []byte) *MetaDeleteCmd

func (*MetaDeleteCmd) SetUpdateTTL

func (cmd *MetaDeleteCmd) SetUpdateTTL(ttl uint32) *MetaDeleteCmd

func (*MetaDeleteCmd) WriteTo

func (cmd *MetaDeleteCmd) WriteTo(dst io.Writer) (int64, error)

type MetaDeleteCmdStatus

type MetaDeleteCmdStatus uint8
const (
	MetaDeleteCmdInvalidStatus MetaDeleteCmdStatus = iota
	MetaDeleteCmdStatusDeleted
	MetaDeleteCmdStatusExists
	MetaDeleteCmdStatusNotFound
)

type MetaDeleteReply

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

func (*MetaDeleteReply) ReadFrom

func (reply *MetaDeleteReply) ReadFrom(src io.Reader) (int64, error)

func (*MetaDeleteReply) Status

func (reply *MetaDeleteReply) Status() MetaDeleteCmdStatus

type MetaGetCmd

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

MetaGetCmd represents the memcached meta get command.

func NewMetaGetCmd

func NewMetaGetCmd(key string) *MetaGetCmd

func (*MetaGetCmd) Key

func (cmd *MetaGetCmd) Key() string

func (*MetaGetCmd) Reset

func (cmd *MetaGetCmd) Reset() *MetaGetCmd

func (*MetaGetCmd) SetKeyAsBase64

func (cmd *MetaGetCmd) SetKeyAsBase64(b bool) *MetaGetCmd

func (*MetaGetCmd) SetNoReply

func (cmd *MetaGetCmd) SetNoReply(b bool) *MetaGetCmd

func (*MetaGetCmd) SetOpaque

func (cmd *MetaGetCmd) SetOpaque(o []byte) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveCas

func (cmd *MetaGetCmd) SetRetrieveCas(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveClientFlags

func (cmd *MetaGetCmd) SetRetrieveClientFlags(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveKey

func (cmd *MetaGetCmd) SetRetrieveKey(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrievePreviousHit

func (cmd *MetaGetCmd) SetRetrievePreviousHit(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveRemainingTTL

func (cmd *MetaGetCmd) SetRetrieveRemainingTTL(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveSize

func (cmd *MetaGetCmd) SetRetrieveSize(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveTimeSinceLastAccess

func (cmd *MetaGetCmd) SetRetrieveTimeSinceLastAccess(b bool) *MetaGetCmd

func (*MetaGetCmd) SetRetrieveValue

func (cmd *MetaGetCmd) SetRetrieveValue(b bool) *MetaGetCmd

func (*MetaGetCmd) SetSkipLRUBump

func (cmd *MetaGetCmd) SetSkipLRUBump(b bool) *MetaGetCmd

func (*MetaGetCmd) SetUpdateTTL

func (cmd *MetaGetCmd) SetUpdateTTL(ttl int64) *MetaGetCmd

func (*MetaGetCmd) SetVivifyOnMiss

func (cmd *MetaGetCmd) SetVivifyOnMiss(ttl uint64) *MetaGetCmd

func (*MetaGetCmd) String

func (cmd *MetaGetCmd) String() string

func (*MetaGetCmd) UnmarshalText

func (cmd *MetaGetCmd) UnmarshalText(data []byte) error

func (*MetaGetCmd) WriteTo

func (cmd *MetaGetCmd) WriteTo(dst io.Writer) (int64, error)

type MetaGetReply

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

func NewMetaGetReply

func NewMetaGetReply() *MetaGetReply

func (*MetaGetReply) IsMiss

func (mr *MetaGetReply) IsMiss() bool

func (*MetaGetReply) Key

func (mr *MetaGetReply) Key() string

Key returns the value associated with the key flag ("k") in the response.

If the base64 flag is toggled, the key is base64 decoded before being returned.

func (*MetaGetReply) ReadFrom

func (reply *MetaGetReply) ReadFrom(src io.Reader) (int64, error)

func (*MetaGetReply) SetCas

func (mr *MetaGetReply) SetCas(v uint64) *MetaGetReply

func (*MetaGetReply) SetClientFlags

func (mr *MetaGetReply) SetClientFlags(v uint32) *MetaGetReply

func (*MetaGetReply) SetItemSize

func (mr *MetaGetReply) SetItemSize(v uint64) *MetaGetReply

func (*MetaGetReply) SetKey

func (mr *MetaGetReply) SetKey(s string, b64 bool) *MetaGetReply

SetKey sets the key to be returned with the response using the key flag ("k"). The provided key should always be in its "raw" form (i.e. not base64 encoded).

If b64 is true, the base64 flag ("b") will be set, as well as the key being base64 encoded before being stored in the reply object.

Note that unlike MetaGetCmd, there is no MetaGetReply.SetKeyAsBase64 method.

If s is an empty string, both the key flag ("k") and the base64 flag ("b") will be cleared, regardless of the value of b64.

func (*MetaGetReply) SetKeyAsBase64

func (mr *MetaGetReply) SetKeyAsBase64(b bool) *MetaGetReply

func (*MetaGetReply) SetMiss

func (mr *MetaGetReply) SetMiss(b bool) *MetaGetReply

func (*MetaGetReply) SetOpaque

func (mr *MetaGetReply) SetOpaque(o []byte) *MetaGetReply

func (*MetaGetReply) SetPreviousHit

func (mr *MetaGetReply) SetPreviousHit(b bool) *MetaGetReply

func (*MetaGetReply) SetRecacheResult

func (mr *MetaGetReply) SetRecacheResult(win bool) *MetaGetReply

func (*MetaGetReply) SetRemainingTTL

func (mr *MetaGetReply) SetRemainingTTL(v int64) *MetaGetReply

func (*MetaGetReply) SetRetrieveKey

func (mr *MetaGetReply) SetRetrieveKey(s string) *MetaGetReply

func (*MetaGetReply) SetStale

func (mr *MetaGetReply) SetStale(b bool) *MetaGetReply

func (*MetaGetReply) SetTimeSinceLastAccess

func (mr *MetaGetReply) SetTimeSinceLastAccess(v uint64) *MetaGetReply

func (*MetaGetReply) SetValue

func (mr *MetaGetReply) SetValue(b []byte) *MetaGetReply

func (*MetaGetReply) Value

func (mr *MetaGetReply) Value() []byte

func (*MetaGetReply) WriteTo

func (mr *MetaGetReply) WriteTo(dst io.Writer) (int64, error)

type MetaSetCmd

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

func NewMetaSetCmd

func NewMetaSetCmd(key string, data []byte) *MetaSetCmd

func (*MetaSetCmd) Key

func (cmd *MetaSetCmd) Key() string

func (*MetaSetCmd) SetKeyAsBase64

func (cmd *MetaSetCmd) SetKeyAsBase64(b64 bool) *MetaSetCmd

func (*MetaSetCmd) SetMode

func (cmd *MetaSetCmd) SetMode(mode MetaSetMode) *MetaSetCmd

func (*MetaSetCmd) SetNoReply

func (cmd *MetaSetCmd) SetNoReply(noreply bool) *MetaSetCmd

func (*MetaSetCmd) SetOpaque

func (cmd *MetaSetCmd) SetOpaque(opaque []byte) *MetaSetCmd

func (*MetaSetCmd) SetRetrieveKey

func (cmd *MetaSetCmd) SetRetrieveKey(v bool) *MetaSetCmd

func (*MetaSetCmd) UnmarshalText

func (cmd *MetaSetCmd) UnmarshalText(data []byte) error

func (*MetaSetCmd) WriteTo

func (cmd *MetaSetCmd) WriteTo(dst io.Writer) (int64, error)

type MetaSetCmdStatus

type MetaSetCmdStatus int
const (
	MetaSetCmdStatusInvalid MetaSetCmdStatus = iota
	// Set operation was successful (command=HD)
	MetaSetCmdStatusStored
	// Data _not_ stored, but not because of an error (command=NS)
	MetaSetCmdStatusNotStored
	// Under CAS semantics, item has been modified since your
	// last fetch (as specified by the CAS value. command=EX)
	MetaSetCmdStatusExists
	// Under CAS semantics, item did not exist (command=NF)
	MetaSetCmdStatusNotFound
)

type MetaSetMode

type MetaSetMode uint8
const (
	MetaSetModeSet MetaSetMode = iota
	MetaSetModeAdd
	MetaSetModeAppend
	MetaSetModePrepend
	MetaSetModeReplace
	MetaSetModeMax
)

func (*MetaSetMode) WriteTo

func (m *MetaSetMode) WriteTo(dst io.Writer) (int64, error)

type MetaSetReply

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

func (*MetaSetReply) Key

func (reply *MetaSetReply) Key() string

func (*MetaSetReply) ReadFrom

func (reply *MetaSetReply) ReadFrom(src io.Reader) (int64, error)

func (*MetaSetReply) Status

func (reply *MetaSetReply) Status() MetaSetCmdStatus

func (*MetaSetReply) WriteTo

func (reply *MetaSetReply) WriteTo(dst io.Writer) (int64, error)

type PrependCmd

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

func NewPrependCmd

func NewPrependCmd(key string, value []byte) *PrependCmd

func (*PrependCmd) Reset

func (cmd *PrependCmd) Reset() *PrependCmd

func (*PrependCmd) SetExpires

func (cmd *PrependCmd) SetExpires(expires int64) *storageCmd

func (*PrependCmd) SetFlags

func (cmd *PrependCmd) SetFlags(flags uint16) *storageCmd

func (*PrependCmd) SetNoReply

func (cmd *PrependCmd) SetNoReply(noreply bool) *storageCmd

func (*PrependCmd) UnmarshalText

func (cmd *PrependCmd) UnmarshalText(data []byte) error

func (*PrependCmd) WriteTo

func (cmd *PrependCmd) WriteTo(dst io.Writer) (int64, error)

type ReplaceCmd

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

func NewReplaceCmd

func NewReplaceCmd(key string, value []byte) *ReplaceCmd

func (*ReplaceCmd) Reset

func (cmd *ReplaceCmd) Reset() *ReplaceCmd

func (*ReplaceCmd) SetExpires

func (cmd *ReplaceCmd) SetExpires(expires int64) *storageCmd

func (*ReplaceCmd) SetFlags

func (cmd *ReplaceCmd) SetFlags(flags uint16) *storageCmd

func (*ReplaceCmd) SetNoReply

func (cmd *ReplaceCmd) SetNoReply(noreply bool) *storageCmd

func (*ReplaceCmd) UnmarshalText

func (cmd *ReplaceCmd) UnmarshalText(data []byte) error

func (*ReplaceCmd) WriteTo

func (cmd *ReplaceCmd) WriteTo(dst io.Writer) (int64, error)

type Reply

type Reply interface {
	io.WriterTo
	encoding.TextUnmarshaler
}

type SetCmd

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

func NewSetCmd

func NewSetCmd(key string, value []byte) *SetCmd

func (*SetCmd) Reset

func (cmd *SetCmd) Reset() *SetCmd

func (*SetCmd) SetExpires

func (cmd *SetCmd) SetExpires(expires int64) *storageCmd

func (*SetCmd) SetFlags

func (cmd *SetCmd) SetFlags(flags uint16) *storageCmd

func (*SetCmd) SetNoReply

func (cmd *SetCmd) SetNoReply(noreply bool) *storageCmd

func (*SetCmd) UnmarshalText

func (cmd *SetCmd) UnmarshalText(data []byte) error

func (*SetCmd) WriteTo

func (cmd *SetCmd) WriteTo(dst io.Writer) (int64, error)

type SetCmdReply

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

func (*SetCmdReply) Status

func (cmd *SetCmdReply) Status() SetCmdReplyType

func (*SetCmdReply) UnmarshalText

func (reply *SetCmdReply) UnmarshalText(data []byte) error

func (*SetCmdReply) WriteTo

func (cmd *SetCmdReply) WriteTo(dst io.Writer) (int64, error)

type SetCmdReplyType

type SetCmdReplyType uint8
const (
	SetCmdReplyInvalid SetCmdReplyType = iota
	SetCmdReplyStored
	SetCmdReplyNotStored
	SetCmdReplyExists
	SetCmdReplyNotFound
	SetCmdReplyTypeMax
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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