← Logger | Concurrent(中文) | Asynchronous Call →
// Maximum Running Vusers
poolSize := 2
// The maximum number of requests that can be cached
maxTaskQueueSize := 5
// Enable asynchronous functionality at creation time
config := sdk.NewConfig()
.WithEnableAsync(true)
.WithGoRoutinePoolSize(poolSize) // Optional,default:5
.WithMaxTaskQueueSize(maxTaskQueueSize) // Optional,default:1000
ecsClient, err := ecs.NewClientWithOptions(config)
// It can also be opened after client is initialized
client.EnableAsync(poolSize, maxTaskQueueSize)
← Logger | Concurrent(中文) | Asynchronous Call →