mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 09:53:21 +08:00
Add hostname to instance name
This commit is contained in:
@@ -12,12 +12,13 @@ import (
|
||||
)
|
||||
|
||||
type Instance struct {
|
||||
Session *Session `json:"-"`
|
||||
Name string `json:"name"`
|
||||
IP string `json:"ip"`
|
||||
Conn *types.HijackedResponse `json:"-"`
|
||||
ExecId string `json:"-"`
|
||||
Ctx context.Context `json:"-"`
|
||||
Session *Session `json:"-"`
|
||||
Name string `json:"name"`
|
||||
Hostname string `json:"hostname"`
|
||||
IP string `json:"ip"`
|
||||
Conn *types.HijackedResponse `json:"-"`
|
||||
ExecId string `json:"-"`
|
||||
Ctx context.Context `json:"-"`
|
||||
}
|
||||
|
||||
var dindImage string
|
||||
@@ -51,7 +52,7 @@ func NewInstance(session *Session) (*Instance, error) {
|
||||
|
||||
go instance.Exec()
|
||||
|
||||
wsServer.BroadcastTo(session.Id, "new instance", instance.Name, instance.IP)
|
||||
wsServer.BroadcastTo(session.Id, "new instance", instance.Name, instance.IP, instance.Hostname)
|
||||
|
||||
return instance, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user