Add error to GetSession return values
- Add button to copy instance SSH access
This commit is contained in:
@@ -77,7 +77,7 @@ type PWDApi interface {
|
||||
SessionClose(session *types.Session) error
|
||||
SessionGetSmallestViewPort(sessionId string) types.ViewPort
|
||||
SessionDeployStack(session *types.Session) error
|
||||
SessionGet(id string) *types.Session
|
||||
SessionGet(id string) (*types.Session, error)
|
||||
SessionSetup(session *types.Session, conf SessionSetupConf) error
|
||||
|
||||
InstanceNew(session *types.Session, conf types.InstanceConfig) (*types.Instance, error)
|
||||
|
||||
@@ -205,17 +205,17 @@ func (p *pwd) SessionDeployStack(s *types.Session) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *pwd) SessionGet(sessionId string) *types.Session {
|
||||
func (p *pwd) SessionGet(sessionId string) (*types.Session, error) {
|
||||
defer observeAction("SessionGet", time.Now())
|
||||
|
||||
s, err := p.storage.SessionGet(sessionId)
|
||||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return nil
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func (p *pwd) SessionSetup(session *types.Session, sconf SessionSetupConf) error {
|
||||
|
||||
Reference in New Issue
Block a user