cmd

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	PreparedStmt string
	Params       []any

	// Payload starts with command type so that replay can reuse this byte array.
	Payload  []byte
	StartTs  time.Time
	ConnID   uint64
	Type     pnet.Command
	Succeess bool
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(packet []byte, startTs time.Time, connID uint64) *Command

func (*Command) Decode

func (c *Command) Decode(reader LineReader) error

func (*Command) Digest

func (c *Command) Digest() string

func (*Command) Encode

func (c *Command) Encode(writer *bytes.Buffer) error

func (*Command) Equal

func (c *Command) Equal(that *Command) bool

func (*Command) QueryText

func (c *Command) QueryText() string

func (*Command) Validate

func (c *Command) Validate(filename string, lineIdx int) error

type LineReader

type LineReader interface {
	String() string
	ReadLine() ([]byte, string, int, error)
	Read([]byte) (string, int, error)
	Close()
}

Jump to

Keyboard shortcuts

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