session_experimental

package
v0.0.0-...-193a162 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2018 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for session experimental API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new session experimental API client.

func (*Client) Session

func (a *Client) Session(params *SessionParams) error

Session initializes interactive session

Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities.

> **Note**: This endpoint is *experimental* and only available if the daemon is started with experimental > features enabled. The specifications for this endpoint may still change in a future version of the API.

### Hijacking

This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection.

For example, the client sends this request to upgrade the connection:

``` POST /session HTTP/1.1 Upgrade: h2c Connection: Upgrade ```

The Docker daemon will respond with a `101 UPGRADED` response follow with the raw stream:

``` HTTP/1.1 101 UPGRADED Connection: Upgrade Upgrade: h2c ```

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type SessionBadRequest

type SessionBadRequest struct {
	Payload *models.ErrorResponse
}

SessionBadRequest handles this case with default header values.

bad parameter

func NewSessionBadRequest

func NewSessionBadRequest() *SessionBadRequest

NewSessionBadRequest creates a SessionBadRequest with default headers values

func (*SessionBadRequest) Error

func (o *SessionBadRequest) Error() string

type SessionInternalServerError

type SessionInternalServerError struct {
	Payload *models.ErrorResponse
}

SessionInternalServerError handles this case with default header values.

server error

func NewSessionInternalServerError

func NewSessionInternalServerError() *SessionInternalServerError

NewSessionInternalServerError creates a SessionInternalServerError with default headers values

func (*SessionInternalServerError) Error

type SessionParams

type SessionParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

SessionParams contains all the parameters to send to the API endpoint for the session operation typically these are written to a http.Request

func NewSessionParams

func NewSessionParams() *SessionParams

NewSessionParams creates a new SessionParams object with the default values initialized.

func NewSessionParamsWithContext

func NewSessionParamsWithContext(ctx context.Context) *SessionParams

NewSessionParamsWithContext creates a new SessionParams object with the default values initialized, and the ability to set a context for a request

func NewSessionParamsWithHTTPClient

func NewSessionParamsWithHTTPClient(client *http.Client) *SessionParams

NewSessionParamsWithHTTPClient creates a new SessionParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewSessionParamsWithTimeout

func NewSessionParamsWithTimeout(timeout time.Duration) *SessionParams

NewSessionParamsWithTimeout creates a new SessionParams object with the default values initialized, and the ability to set a timeout on a request

func (*SessionParams) SetContext

func (o *SessionParams) SetContext(ctx context.Context)

SetContext adds the context to the session params

func (*SessionParams) SetHTTPClient

func (o *SessionParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the session params

func (*SessionParams) SetTimeout

func (o *SessionParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the session params

func (*SessionParams) WithContext

func (o *SessionParams) WithContext(ctx context.Context) *SessionParams

WithContext adds the context to the session params

func (*SessionParams) WithHTTPClient

func (o *SessionParams) WithHTTPClient(client *http.Client) *SessionParams

WithHTTPClient adds the HTTPClient to the session params

func (*SessionParams) WithTimeout

func (o *SessionParams) WithTimeout(timeout time.Duration) *SessionParams

WithTimeout adds the timeout to the session params

func (*SessionParams) WriteToRequest

func (o *SessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type SessionReader

type SessionReader struct {
	// contains filtered or unexported fields
}

SessionReader is a Reader for the Session structure.

func (*SessionReader) ReadResponse

func (o *SessionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type SessionSwitchingProtocols

type SessionSwitchingProtocols struct {
}

SessionSwitchingProtocols handles this case with default header values.

no error, hijacking successful

func NewSessionSwitchingProtocols

func NewSessionSwitchingProtocols() *SessionSwitchingProtocols

NewSessionSwitchingProtocols creates a SessionSwitchingProtocols with default headers values

func (*SessionSwitchingProtocols) Error

func (o *SessionSwitchingProtocols) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL