const ( // DisplayHandshakeTimeout is the maximum allowed time for websocket handshake DisplayHandshakeTimeout = 30 * time.Second // DisplayPingInterval is the time between sending pings DisplayPingInterval = 5 * time.Second // DisplayWriteTimeout is the maximum time between successful writes DisplayWriteTimeout = 10 * time.Second // DisplayPongTimeout is the maximum time between successful reads DisplayPongTimeout = 30 * time.Second // DisplayBufferSize is the internal buffer size, and size of buffer used for // sending messages. DisplayBufferSize = 32 * 1024 // DisplayMaxMessageSize is the maximum message size we will read DisplayMaxMessageSize = 64 * 1024 )
const ( // ErrorCodeDisplayNotFound signals that the given display couldn't be found ErrorCodeDisplayNotFound = "DisplayNotFound" // ErrorCodeExecutionTerminated indicates that the sandbox terminated, hence, // interactive displays can't be opened anymore ErrorCodeExecutionTerminated = "ExecutionTerminated" // ErrorCodeInternalError indicates some internal error, likely a connection // error or something. ErrorCodeInternalError = "InternalError" // ErrorCodeInvalidParameters indicates that the given display parameter isn't // valid, likely it's missing. ErrorCodeInvalidParameters = "InvalidParameters" )
A DisplayEntry list is returned from the socketURL when listing displays. Any request that doesn't try to upgrade the request to a websocket will get a list of displays as response.
An ErrorMessage payload is returned from the socketURL if an error occurred when connecting.
Error returns a string presentation of the ErrorMessage satifying the error interface.