keepalive-gen

command
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

keepalive-gen

Record all memory data allocated for a single request, roll back when an error occurs, otherwise assign the modified data to the resident memory data after processing is completed
把单次请求所分配的内存数据全部记录, 当发生错误时回滚,否则处理完成之后会把修改的数据赋值给常驻内存数据

NOTE:

Must be used with deepcopy-gen
必须配合 deepcopy-gen 使用

It cannot be used in single-threaded direct memory operation mode because the data of the function DoDB cannot cross goroutine
不能用于单线程直接操作内存模式,因为 函数 DoDB 的数据不能跨goroutine

sample:

output_tests

How to use sync.Pool to optimize
使用 sync.Pool 优化的方式

output_tests_no_ka

No sync.Pool optimization is used, all memory is allocated directly
未使用sync.Pool优化,所有内存直接分配

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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