MCPcopy Index your code
hub / github.com/blackbeans/turbo

github.com/blackbeans/turbo @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
266 symbols 703 edges 28 files 120 documented · 45%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
turbo

turbo is a lightweight network framework for golang

Install

go get github.com/blackbeans/turbo

benchmark

main/turbo_server_demo.go

main/turbo_client_demo.go

env:

2.5 GHz Intel Core i7  16GRAM  macbook pro

1 connection 1 groutine  70000 tps

协议定义

总包长(不包含本4B) 请求的seqId 类型  协议的版本号  扩展预留字段  body的长度    Body
---------------------------------------------------------------------------
|Length(4B)|Opaque(4B)|CmdType(1B)|Version(2B)|Extension(8B)|BodyLen(4B)|Body|
---------------------------------------------------------------------------
quickstart
main/turbo_server_demo.go

main/turbo_client_demo.go

Extension points exported contracts — how you extend this code

IEventProcessor (Interface)
处理器 [4 implementers]
turbo_handler.go
Key (Interface)
A Key may be any value that is comparable. See http://golang.org/ref/spec#Comparison_operators
lru.go
IBackwardEvent (Interface)
返回的事件
turbo_event.go
WorkFunc (FuncType)
处理函数
gopool.go
THandler (FuncType)
TContext 处理的上下文 处理器
tpacket.go
ICodec (Interface)
(no doc) [1 implementers]
tcodec.go
OnEvent (FuncType)
(no doc)
turbo_timewheel.go
IHandler (Interface)
处理器接口 [3 implementers]
turbo_handler.go

Core symbols most depended-on inside this repo

RemoteAddr
called by 19
tclient.go
After
called by 14
turbo_timewheel.go
Incr
called by 10
tnetstat.go
Get
called by 9
lru.go
CancelTimer
called by 9
turbo_timewheel.go
Error
called by 9
tconfig.go
Queue
called by 8
gopool.go
GetName
called by 8
turbo_handler.go

Shape

Method 152
Function 54
Struct 45
Interface 9
FuncType 4
TypeAlias 2

Languages

Go100%

Modules by API surface

turbo_handler.go30 symbols
turbo_timewheel.go18 symbols
tclient.go18 symbols
turbo_context.go16 symbols
tclient_manager.go16 symbols
turbo_event.go15 symbols
turbo_context_test.go15 symbols
gopool.go14 symbols
tpacket.go12 symbols
tconfig.go12 symbols
lru.go11 symbols
tsession.go9 symbols

For agents

$ claude mcp add turbo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact