Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	File     string
	Line     int32
	Function string
}

Caller represents a frame in the application call stack.

type Op

type Op int32

Op represents the type of database operation captured.

const (
	OpQuery    Op = iota // db.Query / db.QueryContext
	OpExec               // db.Exec / db.ExecContext
	OpPrepare            // db.Prepare / db.PrepareContext
	OpBegin              // db.Begin / db.BeginTx
	OpCommit             // tx.Commit
	OpRollback           // tx.Rollback
)

func (Op) String

func (o Op) String() string

type Query

type Query struct {
	ID           string
	Op           Op
	Query        string
	Args         []string
	StartTime    time.Time
	Duration     time.Duration
	RowsAffected int64
	Error        string
	Callers      []Caller
	TxID         string
}

Query represents a captured database query event.

Jump to

Keyboard shortcuts

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