New session now expects a struct with everything it needs and a context (#228)

to pass along
This commit is contained in:
Jonathan Leibiusky
2017-11-28 12:14:50 -03:00
committed by Marcos Nils
parent 08f1ead2a9
commit da6a55fb5c
10 changed files with 51 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
package pwd
import (
"context"
"errors"
"io"
"net"
@@ -72,7 +73,7 @@ func SessionNotEmpty(e error) bool {
}
type PWDApi interface {
SessionNew(playground *types.Playground, userId string, duration time.Duration, stack string, stackName, imageName string) (*types.Session, error)
SessionNew(ctx context.Context, config types.SessionConfig) (*types.Session, error)
SessionClose(session *types.Session) error
SessionGetSmallestViewPort(sessionId string) types.ViewPort
SessionDeployStack(session *types.Session) error