Versions in this module Expand all Collapse all v0 v0.0.4 Oct 17, 2023 v0.0.3 Oct 16, 2023 Changes in this version + const ActionTypeSetVar + const ActionTypeUnsetVar + const VarScopeProcess + const VarScopeRequest + const VarScopeResponse + const VarScopeSession + const VarScopeTransaction + var ErrInsufficientSpace = fmt.Errorf("insufficient space in buffer") + var ErrUnterminatedSequence = fmt.Errorf("unterminated sequence") + 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 struct + func AcquireActionWriter(buf []byte, off int) *ActionWriter + func NewActionWriter(buf []byte, off int) *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 byte + const DataTypeBinary + const DataTypeBool + const DataTypeIPV4 + const DataTypeIPV6 + const DataTypeInt32 + const DataTypeInt64 + const DataTypeNull + const DataTypeString + const DataTypeUInt32 + const DataTypeUInt64 + type KVEntry struct + func AcquireKVEntry() *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 struct + func AcquireKVScanner(b []byte, count int) *KVScanner + func NewKVScanner(b []byte, count int) *KVScanner + func (k *KVScanner) Discard() error + func (k *KVScanner) Error() error + func (k *KVScanner) Next(e *KVEntry) bool + func (k *KVScanner) RemainingBuf() int + type KVWriter struct + func AcquireKVWriter(buf []byte, off int) *KVWriter + func NewKVWriter(buf []byte, off int) *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 struct + KV *KVScanner + func AcquireMessage() *Message + func (m *Message) NameBytes() []byte + type MessageScanner struct + func AcquireMessageScanner(buf []byte) *MessageScanner + func NewMessageScanner(b []byte) *MessageScanner + func (s *MessageScanner) Error() error + func (s *MessageScanner) Next(m *Message) bool