sqlite3stat

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sqlite3stat provides optional SQLite connection status helpers for observability.

Index

Constants

This section is empty.

Variables

View Source
var PutDebugHook *func(*sql.Conn) []slog.Attr

PutDebugHook is an optional hook for extra debug attributes on pool Put. A nil pointer or a nil *func is a no-op.

Functions

func DBStatusMem

func DBStatusMem(conn *sql.Conn) (int64, bool)

DBStatusMem returns the sum of CACHE_USED, SCHEMA_USED, and STMT_USED for conn.

func DefaultPutDebugAttrs

func DefaultPutDebugAttrs(conn *sql.Conn) []slog.Attr

DefaultPutDebugAttrs returns db_status_mem when readable from conn.

func PutDebugAttrs

func PutDebugAttrs(conn *sql.Conn) []slog.Attr

PutDebugAttrs returns hook attrs when PutDebugHook is set; otherwise nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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