taskcluster-worker: github.com/taskcluster/taskcluster-worker/plugins/interactive/displayconsts Index | Files

package displayconsts

import "github.com/taskcluster/taskcluster-worker/plugins/interactive/displayconsts"


Package Files

displayconsts.go errorcodes.go payload.go


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"

type DisplayEntry Uses

type DisplayEntry struct {
    Display     string `json:"display"`
    Description string `json:"description"`
    Width       int    `json:"width,omitempty"`
    Height      int    `json:"height,omitempty"`

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.

type ErrorMessage Uses

type ErrorMessage struct {
    Code    string `json:"code"`
    Message string `json:"message"`

An ErrorMessage payload is returned from the socketURL if an error occurred when connecting.

func (*ErrorMessage) Error Uses

func (e *ErrorMessage) Error() string

Error returns a string presentation of the ErrorMessage satifying the error interface.

Package displayconsts imports 2 packages (graph) and is imported by 2 packages. Updated 2016-10-06. Refresh now. Tools for package owners.