Documentation ¶
Index ¶
- Constants
- Variables
- func PutAddr(b []byte, ip netip.Addr) (int, error)
- func PutBytes(b []byte, v []byte) (int, error)
- func PutVarint(b []byte, i int64) (int, error)
- func ReleaseActionWriter(w *ActionWriter)
- func ReleaseKVEntry(k *KVEntry)
- func ReleaseKVScanner(s *KVScanner)
- func ReleaseKVWriter(w *KVWriter)
- func ReleaseMessage(m *Message)
- func ReleaseMessageScanner(s *MessageScanner)
- func Varint(b []byte) (int64, int, error)
- type ActionWriter
- func (aw *ActionWriter) Bytes() []byte
- func (aw *ActionWriter) Off() int
- func (aw *ActionWriter) SetAddr(s varScope, name string, v netip.Addr) error
- func (aw *ActionWriter) SetBinary(s varScope, name string, v []byte) error
- func (aw *ActionWriter) SetBool(s varScope, name string, v bool) error
- func (aw *ActionWriter) SetInt32(s varScope, name string, v int32) error
- func (aw *ActionWriter) SetInt64(s varScope, name string, v int64) error
- func (aw *ActionWriter) SetNull(s varScope, name string) error
- func (aw *ActionWriter) SetString(s varScope, name string, v string) error
- func (aw *ActionWriter) SetStringBytes(s varScope, name string, v []byte) error
- func (aw *ActionWriter) SetUInt32(s varScope, name string, v uint32) error
- func (aw *ActionWriter) SetUInt64(s varScope, name string, v uint64) error
- func (aw *ActionWriter) Unset(s varScope, name string) error
- type DataType
- type KVEntry
- func (k *KVEntry) NameBytes() []byte
- func (k *KVEntry) NameEquals(s string) bool
- func (k *KVEntry) Reset()
- func (k *KVEntry) Type() DataType
- func (k *KVEntry) Value() any
- func (k *KVEntry) ValueAddr() netip.Addr
- func (k *KVEntry) ValueBool() bool
- func (k *KVEntry) ValueBytes() []byte
- func (k *KVEntry) ValueInt() int64
- type KVScanner
- type KVWriter
- func (aw *KVWriter) Bytes() []byte
- func (aw *KVWriter) Off() int
- func (aw *KVWriter) SetAddr(name string, v netip.Addr) error
- func (aw *KVWriter) SetBinary(name string, v []byte) error
- func (aw *KVWriter) SetBool(name string, v bool) error
- func (aw *KVWriter) SetInt32(name string, v int32) error
- func (aw *KVWriter) SetInt64(name string, v int64) error
- func (aw *KVWriter) SetNull(name string) error
- func (aw *KVWriter) SetString(name string, v string) error
- func (aw *KVWriter) SetUInt32(name string, v uint32) error
- func (aw *KVWriter) SetUInt64(name string, v uint64) error
- type Message
- type MessageScanner
Constants ¶
View Source
const ( ActionTypeSetVar actionType = 1 ActionTypeUnsetVar actionType = 2 )
View Source
const ( VarScopeProcess varScope = 0 VarScopeSession varScope = 1 VarScopeTransaction varScope = 2 VarScopeRequest varScope = 3 VarScopeResponse varScope = 4 )
Variables ¶
View Source
var ( ErrUnterminatedSequence = fmt.Errorf("unterminated sequence") ErrInsufficientSpace = fmt.Errorf("insufficient space in buffer") )
Functions ¶
func ReleaseActionWriter ¶
func ReleaseActionWriter(w *ActionWriter)
func ReleaseKVEntry ¶
func ReleaseKVEntry(k *KVEntry)
func ReleaseKVScanner ¶
func ReleaseKVScanner(s *KVScanner)
func ReleaseKVWriter ¶
func ReleaseKVWriter(w *KVWriter)
func ReleaseMessage ¶
func ReleaseMessage(m *Message)
func ReleaseMessageScanner ¶
func ReleaseMessageScanner(s *MessageScanner)
Types ¶
type ActionWriter ¶
type ActionWriter struct {
// contains filtered or unexported fields
}
func AcquireActionWriter ¶
func AcquireActionWriter(buf []byte, off int) *ActionWriter
func NewActionWriter ¶
func NewActionWriter(buf []byte, off int) *ActionWriter
func (*ActionWriter) Bytes ¶
func (aw *ActionWriter) Bytes() []byte
func (*ActionWriter) Off ¶
func (aw *ActionWriter) Off() int
func (*ActionWriter) SetAddr ¶
func (aw *ActionWriter) SetAddr(s varScope, name string, v netip.Addr) error
func (*ActionWriter) SetBinary ¶
func (aw *ActionWriter) SetBinary(s varScope, name string, v []byte) error
func (*ActionWriter) SetBool ¶
func (aw *ActionWriter) SetBool(s varScope, name string, v bool) error
func (*ActionWriter) SetInt32 ¶
func (aw *ActionWriter) SetInt32(s varScope, name string, v int32) error
func (*ActionWriter) SetInt64 ¶
func (aw *ActionWriter) SetInt64(s varScope, name string, v int64) error
func (*ActionWriter) SetNull ¶
func (aw *ActionWriter) SetNull(s varScope, name string) error
func (*ActionWriter) SetString ¶
func (aw *ActionWriter) SetString(s varScope, name string, v string) error
func (*ActionWriter) SetStringBytes ¶
func (aw *ActionWriter) SetStringBytes(s varScope, name string, v []byte) error
func (*ActionWriter) SetUInt32 ¶
func (aw *ActionWriter) SetUInt32(s varScope, name string, v uint32) error
func (*ActionWriter) SetUInt64 ¶
func (aw *ActionWriter) SetUInt64(s varScope, name string, v uint64) error
func (*ActionWriter) Unset ¶
func (aw *ActionWriter) Unset(s varScope, name string) error
type KVEntry ¶
type KVEntry struct {
// contains filtered or unexported fields
}
func AcquireKVEntry ¶
func AcquireKVEntry() *KVEntry
func (*KVEntry) NameEquals ¶
func (*KVEntry) Value ¶
Value returns the typed value for the KVEntry. It can allocate memory which is why assertions and direct type access is recommended.
func (*KVEntry) ValueBytes ¶
type KVScanner ¶
type KVScanner struct {
// contains filtered or unexported fields
}
func AcquireKVScanner ¶
func NewKVScanner ¶
func (*KVScanner) RemainingBuf ¶
RemainingBuf returns the remaining length of the buffer
type KVWriter ¶
type KVWriter struct {
// contains filtered or unexported fields
}
func AcquireKVWriter ¶
func NewKVWriter ¶
type Message ¶
type Message struct { KV *KVScanner // contains filtered or unexported fields }
func AcquireMessage ¶
func AcquireMessage() *Message
type MessageScanner ¶
type MessageScanner struct {
// contains filtered or unexported fields
}
func AcquireMessageScanner ¶
func AcquireMessageScanner(buf []byte) *MessageScanner
func NewMessageScanner ¶
func NewMessageScanner(b []byte) *MessageScanner
func (*MessageScanner) Error ¶
func (s *MessageScanner) Error() error
func (*MessageScanner) Next ¶
func (s *MessageScanner) Next(m *Message) bool
Click to show internal directories.
Click to hide internal directories.