pkg

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server MySQL 服务器

func NewServer

func NewServer(cfg *config.Config) *Server

NewServer 创建新的服务器实例

func (*Server) Close

func (s *Server) Close() error

Close 关闭服务器并释放资源

func (*Server) GetCacheManager

func (s *Server) GetCacheManager() *monitor.CacheManager

GetCacheManager 获取缓存管理器

func (*Server) GetDataSource

func (s *Server) GetDataSource() domain.DataSource

GetDataSource 获取默认数据源

func (*Server) GetDataSourceManager

func (s *Server) GetDataSourceManager() *application.DataSourceManager

GetDataSourceManager 获取数据源管理器

func (*Server) GetGoroutinePoolStats

func (s *Server) GetGoroutinePoolStats() pool.PoolStats

GetGoroutinePoolStats 获取goroutine池统计信息

func (*Server) GetMetricsCollector

func (s *Server) GetMetricsCollector() *monitor.MetricsCollector

GetMetricsCollector 获取监控指标收集器

func (*Server) GetObjectPoolStats

func (s *Server) GetObjectPoolStats() pool.PoolStats

GetObjectPoolStats 获取对象池统计信息

func (*Server) GetUseOptimizer

func (s *Server) GetUseOptimizer() bool

GetUseOptimizer 获取是否使用优化器

func (*Server) HandleConn

func (s *Server) HandleConn(ctx context.Context, conn net.Conn) (err error)

HandleConn 用于处理MYSQL的链接

func (*Server) SetDataSource

func (s *Server) SetDataSource(ds domain.DataSource) error

SetDataSource 设置默认数据源

func (*Server) SetDataSourceManager

func (s *Server) SetDataSourceManager(mgr *application.DataSourceManager)

SetDataSourceManager 设置数据源管理器

func (*Server) SetUseOptimizer

func (s *Server) SetUseOptimizer(use bool)

SetUseOptimizer 设置是否使用优化器

func (*Server) Start

func (s *Server) Start(ctx context.Context, listener net.Listener) error

Start 启动服务器

Directories

Path Synopsis
api
sql
badger
Package badger provides a persistent storage backend using Badger KV store.
Package badger provides a persistent storage backend using Badger KV store.
csv
hybrid
Package hybrid provides a hybrid data source that combines memory and persistent storage.
Package hybrid provides a hybrid data source that combines memory and persistent storage.
Package workerpool provides a reusable, high-performance worker pool for parallel task execution with dynamic scaling and graceful shutdown.
Package workerpool provides a reusable, high-performance worker pool for parallel task execution with dynamic scaling and graceful shutdown.

Jump to

Keyboard shortcuts

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