memory

package
v1.3.3-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemManager

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

MemManager is a manager for memory usage. Although the continuous profiling collects profiles periodically, when TiProxy runs in the replayer mode, the profiles are not collected.

func NewMemManager

func NewMemManager(lg *zap.Logger, cfgGetter config.ConfigGetter) *MemManager

func (*MemManager) Close

func (m *MemManager) Close()

func (*MemManager) LatestUsage

func (m *MemManager) LatestUsage() UsageSnapshot

func (*MemManager) ShouldRejectNewConn

func (m *MemManager) ShouldRejectNewConn() (bool, UsageSnapshot, float64)

func (*MemManager) Start

func (m *MemManager) Start(ctx context.Context)

func (*MemManager) UpdateConnBufferMemory

func (m *MemManager) UpdateConnBufferMemory(delta int64)

type UsageSnapshot

type UsageSnapshot struct {
	Used       uint64
	Limit      uint64
	Usage      float64
	UpdateTime time.Time
	Valid      bool
}

Jump to

Keyboard shortcuts

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