MCPcopy Create free account
hub / github.com/astercloud/aster / NewExecutor

Function NewExecutor

pkg/tools/executor.go:26–38  ·  view source on GitHub ↗

NewExecutor 创建工具执行器

(config ExecutorConfig)

Source from the content-addressed store, hash-verified

24
25// NewExecutor 创建工具执行器
26func NewExecutor(config ExecutorConfig) *Executor {
27 if config.MaxConcurrency <= 0 {
28 config.MaxConcurrency = 3 // 默认3个并发
29 }
30 if config.DefaultTimeout <= 0 {
31 config.DefaultTimeout = 60 * time.Second
32 }
33
34 return &Executor{
35 config: config,
36 semaphore: make(chan struct{}, config.MaxConcurrency),
37 }
38}
39
40// ExecuteRequest 执行请求
41type ExecuteRequest struct {

Callers 2

NewFunction · 0.92
CreateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected