handlers

package
v0.0.0-...-551f274 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TermAttrSetters map[uint8]TCSetter = map[uint8]TCSetter{
	ssh.VINTR:    &ccSetter{Character: syscall.VINTR},
	ssh.VQUIT:    &ccSetter{Character: syscall.VQUIT},
	ssh.VERASE:   &ccSetter{Character: syscall.VERASE},
	ssh.VKILL:    &ccSetter{Character: syscall.VKILL},
	ssh.VEOF:     &ccSetter{Character: syscall.VEOF},
	ssh.VEOL:     &ccSetter{Character: syscall.VEOL},
	ssh.VEOL2:    &ccSetter{Character: syscall.VEOL2},
	ssh.VSTART:   &ccSetter{Character: syscall.VSTART},
	ssh.VSTOP:    &ccSetter{Character: syscall.VSTOP},
	ssh.VSUSP:    &ccSetter{Character: syscall.VSUSP},
	ssh.VDSUSP:   &nopSetter{},
	ssh.VREPRINT: &ccSetter{Character: syscall.VREPRINT},
	ssh.VWERASE:  &ccSetter{Character: syscall.VWERASE},
	ssh.VLNEXT:   &ccSetter{Character: syscall.VLNEXT},
	ssh.VFLUSH:   &nopSetter{},
	ssh.VSWTCH:   &nopSetter{},
	ssh.VSTATUS:  &nopSetter{},
	ssh.VDISCARD: &ccSetter{Character: syscall.VDISCARD},

	ssh.IGNPAR:  &iflagSetter{Flag: syscall.IGNPAR},
	ssh.PARMRK:  &iflagSetter{Flag: syscall.PARMRK},
	ssh.INPCK:   &iflagSetter{Flag: syscall.INPCK},
	ssh.ISTRIP:  &iflagSetter{Flag: syscall.ISTRIP},
	ssh.INLCR:   &iflagSetter{Flag: syscall.INLCR},
	ssh.IGNCR:   &iflagSetter{Flag: syscall.IGNCR},
	ssh.ICRNL:   &iflagSetter{Flag: syscall.ICRNL},
	ssh.IUCLC:   &nopSetter{},
	ssh.IXON:    &iflagSetter{Flag: syscall.IXON},
	ssh.IXANY:   &iflagSetter{Flag: syscall.IXANY},
	ssh.IXOFF:   &iflagSetter{Flag: syscall.IXOFF},
	ssh.IMAXBEL: &iflagSetter{Flag: syscall.IMAXBEL},

	ssh.ISIG:    &lflagSetter{Flag: syscall.ISIG},
	ssh.ICANON:  &lflagSetter{Flag: syscall.ICANON},
	ssh.XCASE:   &nopSetter{},
	ssh.ECHO:    &lflagSetter{Flag: syscall.ECHO},
	ssh.ECHOE:   &lflagSetter{Flag: syscall.ECHOE},
	ssh.ECHOK:   &lflagSetter{Flag: syscall.ECHOK},
	ssh.ECHONL:  &lflagSetter{Flag: syscall.ECHONL},
	ssh.NOFLSH:  &lflagSetter{Flag: syscall.NOFLSH},
	ssh.TOSTOP:  &lflagSetter{Flag: syscall.TOSTOP},
	ssh.IEXTEN:  &lflagSetter{Flag: syscall.IEXTEN},
	ssh.ECHOCTL: &lflagSetter{Flag: syscall.ECHOCTL},
	ssh.ECHOKE:  &lflagSetter{Flag: syscall.ECHOKE},
	ssh.PENDIN:  &lflagSetter{Flag: syscall.PENDIN},

	ssh.OPOST:  &oflagSetter{Flag: syscall.OPOST},
	ssh.OLCUC:  &nopSetter{},
	ssh.ONLCR:  &oflagSetter{Flag: syscall.ONLCR},
	ssh.OCRNL:  &oflagSetter{Flag: syscall.OCRNL},
	ssh.ONOCR:  &oflagSetter{Flag: syscall.ONOCR},
	ssh.ONLRET: &oflagSetter{Flag: syscall.ONLRET},

	ssh.CS7:    &cflagSetter{Flag: syscall.CS7},
	ssh.CS8:    &cflagSetter{Flag: syscall.CS8},
	ssh.PARENB: &cflagSetter{Flag: syscall.PARENB},
	ssh.PARODD: &cflagSetter{Flag: syscall.PARODD},

	ssh.TTY_OP_ISPEED: &nopSetter{},
	ssh.TTY_OP_OSPEED: &nopSetter{},
}

Functions

func TcGetAttr

func TcGetAttr(tty *os.File) (*syscall.Termios, error)

func TcSetAttr

func TcSetAttr(tty *os.File, termios *syscall.Termios) error

Types

type Dialer

type Dialer interface {
	Dial(net, addr string) (net.Conn, error)
}

type DirectTcpipChannelHandler

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

func NewDirectTcpipChannelHandler

func NewDirectTcpipChannelHandler(dialer Dialer) *DirectTcpipChannelHandler

func (*DirectTcpipChannelHandler) HandleNewChannel

func (handler *DirectTcpipChannelHandler) HandleNewChannel(logger lager.Logger, newChannel ssh.NewChannel)

type GlobalRequestHandler

type GlobalRequestHandler interface {
	HandleRequest(logger lager.Logger, request *ssh.Request)
}

type NewChannelHandler

type NewChannelHandler interface {
	HandleNewChannel(logger lager.Logger, newChannel ssh.NewChannel)
}

type Runner

type Runner interface {
	Start(cmd *exec.Cmd) error
	Wait(cmd *exec.Cmd) error
	Signal(cmd *exec.Cmd, signal syscall.Signal) error
}

func NewCommandRunner

func NewCommandRunner() Runner

type SessionChannelHandler

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

func NewSessionChannelHandler

func NewSessionChannelHandler(
	runner Runner,
	shellLocator ShellLocator,
	defaultEnv map[string]string,
	keepalive time.Duration,
) *SessionChannelHandler

func (*SessionChannelHandler) HandleNewChannel

func (handler *SessionChannelHandler) HandleNewChannel(logger lager.Logger, newChannel ssh.NewChannel)

type ShellLocator

type ShellLocator interface {
	ShellPath() string
}

func NewShellLocator

func NewShellLocator() ShellLocator

type TCSetter

type TCSetter interface {
	Set(pty *os.File, termios *syscall.Termios, value uint32) error
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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