Refactor storage to support shallow types.
Add Client to storage. Fix client resizing issues.
This commit is contained in:
@@ -6,19 +6,16 @@ import (
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
Id string `json:"id"`
|
||||
Instances map[string]*Instance `json:"instances" bson:"-"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
PwdIpAddress string `json:"pwd_ip_address"`
|
||||
Ready bool `json:"ready"`
|
||||
Stack string `json:"stack"`
|
||||
StackName string `json:"stack_name"`
|
||||
ImageName string `json:"image_name"`
|
||||
Host string `json:"host"`
|
||||
Clients []*Client `json:"-" bson:"-"`
|
||||
WindowsAssigned []*WindowsInstance `json:"-" bson:"-"`
|
||||
rw sync.Mutex `json:"-"`
|
||||
Id string `json:"id" bson:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ExpiresAt time.Time `json:"expires_at"`
|
||||
PwdIpAddress string `json:"pwd_ip_address"`
|
||||
Ready bool `json:"ready"`
|
||||
Stack string `json:"stack"`
|
||||
StackName string `json:"stack_name"`
|
||||
ImageName string `json:"image_name"`
|
||||
Host string `json:"host"`
|
||||
rw sync.Mutex `json:"-"`
|
||||
}
|
||||
|
||||
func (s *Session) Lock() {
|
||||
|
||||
Reference in New Issue
Block a user