Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultConnectionErrorLimit = 10
Variables ¶
View Source
var WebsocketMessageType = map[int]string{ websocket.BinaryMessage: "binary", websocket.TextMessage: "text", websocket.CloseMessage: "close", websocket.PingMessage: "ping", websocket.PongMessage: "pong", }
Functions ¶
func GetShellHandler ¶
func GetShellHandler(opts HandlerOpts) http.HandlerFunc
Types ¶
type HandlerOpts ¶
type HandlerOpts struct { // AllowedHostnames is a list of strings which will be matched to the client // requesting for a connection upgrade to a websocket connection AllowedHostnames []string // Arguments is a list of strings to pass as arguments to the specified COmmand Arguments []string // Command is the path to the binary we should create a TTY for Command string // ConnectionErrorLimit defines the number of consecutive errors that can happen // before a connection is considered unusable ConnectionErrorLimit int Logger golog.MyLogger // KeepalivePingTimeout defines the maximum duration between which a ping and pong // cycle should be tolerated, beyond this the connection should be deemed dead KeepalivePingTimeout time.Duration MaxBufferSizeBytes int JwtCheck gohttp.JwtChecker }
Click to show internal directories.
Click to hide internal directories.