concurrent

command
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Command concurrent 演示用一条 GlobalEventStream 长连服务多个 session, 适用 HTTP 网关 / 机器人适配层等"一进多出"场景。

用法:

go run ./examples/concurrent
go run ./examples/concurrent -n 3 -prompt "用一句话介绍 Go"

设计:N 个 worker 各自 CreateSession + Prompt,共用同一个 stream; 按 sessionID 路由的语义由 GlobalEventStream 内部完成,本例只消费各自订阅 chan。

Jump to

Keyboard shortcuts

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