Goroutine and Worker Manager
go get github.com/mehditeymorian/koi
// create a pond
pond := koi.NewPond()
// create a worker
worker := koi.Worker{
ConcurrentCount: CONCURRENT_RUNNING_GOROUTINE_FOR_THIS_WORKER,
QueueSize: REQUEST_QUEUE_SIZE,
Work: func(a any) any {
// do some work
return RESULT
},
}
// register worker to a unique id
err = pond.RegisterWorker("workerID", worker)
// add job to worker
// this is non-blocking unless the queue is full.
resultChan, err := pond.AddJob("workerID", requestData)
// read results from worker
for res := range resultChan {
// do something with result
}
Note: pond.AddJob
is non-blocking unless worker queue is full.
Enforcing per team quota (sum of used resources across all their namespaces) and delegating the per namespace quota to users.
🧺 A practical store microservices sample, built with Golang, Domain-Driven Design, CQRS, Event Sourcing, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
SSE over QUIC protocol
A curated list of awesome articles and resources for learning and practicing Go and its related technologies.
Wait4X allows you to wait for a port or a service to enter the requested state.
A lightweight yet powerful configuration manager for the Go programming language
Make your URLs shorter (smaller) and more memorable in Go