mysql

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy is a TCP proxy that sits between a MySQL client and server, capturing query events from the wire protocol.

func New

func New(listenAddr, upstreamAddr string) *Proxy

New creates a new MySQL proxy.

func (*Proxy) Close

func (p *Proxy) Close() error

Close stops the proxy and waits for all connections to finish.

func (*Proxy) Events

func (p *Proxy) Events() <-chan proxy.Event

Events returns the channel of captured events.

func (*Proxy) ListenAndServe

func (p *Proxy) ListenAndServe(ctx context.Context) error

ListenAndServe starts accepting client connections and relaying them to MySQL.

Jump to

Keyboard shortcuts

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