19166: Merge branch 'main'
[arvados.git] / sdk / go / arvados / api.go
index 1b303ffb414c893d0f6ada0622e12af3d34f75bb..3797a17f50d504ae2894ac4c6a68f598b4e37564 100644 (file)
@@ -10,6 +10,7 @@ import (
        "encoding/json"
        "io"
        "net"
+       "net/http"
 
        "github.com/sirupsen/logrus"
 )
@@ -97,15 +98,14 @@ type ContainerSSHOptions struct {
        UUID          string `json:"uuid"`
        DetachKeys    string `json:"detach_keys"`
        LoginUsername string `json:"login_username"`
+       NoForward     bool   `json:"no_forward"`
 }
 
-type ContainerSSHConnection ConnectionResponse
-
 type ConnectionResponse struct {
-       Conn          net.Conn           `json:"-"`
-       Bufrw         *bufio.ReadWriter  `json:"-"`
-       Logger        logrus.FieldLogger `json:"-"`
-       UpgradeHeader string             `json:"-"`
+       Conn   net.Conn           `json:"-"`
+       Bufrw  *bufio.ReadWriter  `json:"-"`
+       Logger logrus.FieldLogger `json:"-"`
+       Header http.Header        `json:"-"`
 }
 
 type ContainerGatewayTunnelOptions struct {
@@ -263,7 +263,7 @@ type API interface {
        ContainerDelete(ctx context.Context, options DeleteOptions) (Container, error)
        ContainerLock(ctx context.Context, options GetOptions) (Container, error)
        ContainerUnlock(ctx context.Context, options GetOptions) (Container, error)
-       ContainerSSH(ctx context.Context, options ContainerSSHOptions) (ContainerSSHConnection, error)
+       ContainerSSH(ctx context.Context, options ContainerSSHOptions) (ConnectionResponse, error)
        ContainerGatewayTunnel(ctx context.Context, options ContainerGatewayTunnelOptions) (ConnectionResponse, error)
        ContainerRequestCreate(ctx context.Context, options CreateOptions) (ContainerRequest, error)
        ContainerRequestUpdate(ctx context.Context, options UpdateOptions) (ContainerRequest, error)