mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 09:53:21 +08:00
Refactor sessions and add locking to avoid concurrent requests to create
more instances
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/franela/play-with-docker/cookoo"
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
sync.Mutex
|
||||
Id string `json:"id"`
|
||||
Instances map[string]*Instance `json:"instances"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user