tunnel

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: BSD-3-Clause Imports: 7 Imported by: 8

Documentation

Overview

Package tunnel defines an interface for creating a network tunnel from client to server.

Index

Constants

This section is empty.

Variables

View Source
var ForwarderDesc rpc.InterfaceDesc = descForwarder

ForwarderDesc describes the Forwarder interface.

View Source
var TunnelDesc rpc.InterfaceDesc = descTunnel

TunnelDesc describes the Tunnel interface.

Functions

func VDLReadClientShellPacket

func VDLReadClientShellPacket(dec vdl.Decoder, x *ClientShellPacket) error

func VDLReadServerShellPacket

func VDLReadServerShellPacket(dec vdl.Decoder, x *ServerShellPacket) error

Types

type ClientShellPacket

type ClientShellPacket interface {
	// Index returns the field index.
	Index() int
	// Interface returns the field value as an interface.
	Interface() interface{}
	// Name returns the field name.
	Name() string
	// VDLReflect describes the ClientShellPacket union type.
	VDLReflect(vdlClientShellPacketReflect)
	VDLIsZero() bool
	VDLWrite(vdl.Encoder) error
}

ClientShellPacket represents any single field of the ClientShellPacket union type.

type ClientShellPacketEndOfFile

type ClientShellPacketEndOfFile struct{ Value Unused }

ClientShellPacketEndOfFile represents field EndOfFile of the ClientShellPacket union type.

Indicates that stdin should be closed. The presence of this field indicates EOF. Its actual value is ignored.

func (ClientShellPacketEndOfFile) Index

func (x ClientShellPacketEndOfFile) Index() int

func (ClientShellPacketEndOfFile) Interface

func (x ClientShellPacketEndOfFile) Interface() interface{}

func (ClientShellPacketEndOfFile) Name

func (ClientShellPacketEndOfFile) VDLIsZero

func (x ClientShellPacketEndOfFile) VDLIsZero() bool

func (ClientShellPacketEndOfFile) VDLReflect

func (x ClientShellPacketEndOfFile) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketEndOfFile) VDLWrite

func (x ClientShellPacketEndOfFile) VDLWrite(enc vdl.Encoder) error

type ClientShellPacketStdin

type ClientShellPacketStdin struct{ Value []byte }

ClientShellPacketStdin represents field Stdin of the ClientShellPacket union type.

Bytes going to the shell's stdin.

func (ClientShellPacketStdin) Index

func (x ClientShellPacketStdin) Index() int

func (ClientShellPacketStdin) Interface

func (x ClientShellPacketStdin) Interface() interface{}

func (ClientShellPacketStdin) Name

func (x ClientShellPacketStdin) Name() string

func (ClientShellPacketStdin) VDLIsZero

func (x ClientShellPacketStdin) VDLIsZero() bool

func (ClientShellPacketStdin) VDLReflect

func (x ClientShellPacketStdin) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketStdin) VDLWrite

func (x ClientShellPacketStdin) VDLWrite(enc vdl.Encoder) error

type ClientShellPacketWinSize

type ClientShellPacketWinSize struct{ Value WindowSize }

ClientShellPacketWinSize represents field WinSize of the ClientShellPacket union type.

A dynamic update of the window size.

func (ClientShellPacketWinSize) Index

func (x ClientShellPacketWinSize) Index() int

func (ClientShellPacketWinSize) Interface

func (x ClientShellPacketWinSize) Interface() interface{}

func (ClientShellPacketWinSize) Name

func (ClientShellPacketWinSize) VDLIsZero

func (x ClientShellPacketWinSize) VDLIsZero() bool

func (ClientShellPacketWinSize) VDLReflect

func (x ClientShellPacketWinSize) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketWinSize) VDLWrite

func (x ClientShellPacketWinSize) VDLWrite(enc vdl.Encoder) error

type ForwarderClientMethods

type ForwarderClientMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to a predetermined network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(*context.T, ...rpc.CallOpt) (ForwarderForwardClientCall, error)
}

ForwarderClientMethods is the client interface containing Forwarder methods.

type ForwarderClientStub

type ForwarderClientStub interface {
	ForwarderClientMethods
}

ForwarderClientStub embeds ForwarderClientMethods and is a placeholder for additional management operations.

func ForwarderClient

func ForwarderClient(name string) ForwarderClientStub

ForwarderClient returns a client stub for Forwarder.

type ForwarderForwardClientCall

type ForwarderForwardClientCall interface {
	ForwarderForwardClientStream
	// Finish performs the equivalent of SendStream().Close, then blocks until
	// the server is done, and returns the positional return values for the call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() error
}

ForwarderForwardClientCall represents the call returned from Forwarder.Forward.

type ForwarderForwardClientStream

type ForwarderForwardClientStream interface {
	// RecvStream returns the receiver side of the Forwarder.Forward client stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Forwarder.Forward client stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors
		// encountered while sending, or if Send is called after Close or
		// the stream has been canceled.  Blocks if there is no buffer
		// space; will unblock when buffer space is available or after
		// the stream has been canceled.
		Send(item []byte) error
		// Close indicates to the server that no more items will be sent;
		// server Recv calls will receive io.EOF after all sent items.
		// This is an optional call - e.g. a client might call Close if it
		// needs to continue receiving items from the server after it's
		// done sending.  Returns errors encountered while closing, or if
		// Close is called after the stream has been canceled.  Like Send,
		// blocks if there is no buffer space available.
		Close() error
	}
}

ForwarderForwardClientStream is the client stream for Forwarder.Forward.

type ForwarderForwardServerCall

type ForwarderForwardServerCall interface {
	rpc.ServerCall
	ForwarderForwardServerStream
}

ForwarderForwardServerCall represents the context passed to Forwarder.Forward.

type ForwarderForwardServerCallStub

type ForwarderForwardServerCallStub struct {
	rpc.StreamServerCall
	// contains filtered or unexported fields
}

ForwarderForwardServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements ForwarderForwardServerCall.

func (*ForwarderForwardServerCallStub) Init

Init initializes ForwarderForwardServerCallStub from rpc.StreamServerCall.

func (*ForwarderForwardServerCallStub) RecvStream

func (s *ForwarderForwardServerCallStub) RecvStream() interface {
	Advance() bool
	Value() []byte
	Err() error
}

RecvStream returns the receiver side of the Forwarder.Forward server stream.

func (*ForwarderForwardServerCallStub) SendStream

func (s *ForwarderForwardServerCallStub) SendStream() interface {
	Send(item []byte) error
}

SendStream returns the send side of the Forwarder.Forward server stream.

type ForwarderForwardServerStream

type ForwarderForwardServerStream interface {
	// RecvStream returns the receiver side of the Forwarder.Forward server stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Forwarder.Forward server stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors encountered
		// while sending.  Blocks if there is no buffer space; will unblock when
		// buffer space is available.
		Send(item []byte) error
	}
}

ForwarderForwardServerStream is the server stream for Forwarder.Forward.

type ForwarderServerMethods

type ForwarderServerMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to a predetermined network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(*context.T, ForwarderForwardServerCall) error
}

ForwarderServerMethods is the interface a server writer implements for Forwarder.

type ForwarderServerStub

type ForwarderServerStub interface {
	ForwarderServerStubMethods
	// DescribeInterfaces the Forwarder interfaces.
	Describe__() []rpc.InterfaceDesc
}

ForwarderServerStub adds universal methods to ForwarderServerStubMethods.

func ForwarderServer

func ForwarderServer(impl ForwarderServerMethods) ForwarderServerStub

ForwarderServer returns a server stub for Forwarder. It converts an implementation of ForwarderServerMethods into an object that may be used by rpc.Server.

type ForwarderServerStubMethods

type ForwarderServerStubMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to a predetermined network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(*context.T, *ForwarderForwardServerCallStub) error
}

ForwarderServerStubMethods is the server interface containing Forwarder methods, as expected by rpc.Server. The only difference between this interface and ForwarderServerMethods is the streaming methods.

type ServerShellPacket

type ServerShellPacket interface {
	// Index returns the field index.
	Index() int
	// Interface returns the field value as an interface.
	Interface() interface{}
	// Name returns the field name.
	Name() string
	// VDLReflect describes the ServerShellPacket union type.
	VDLReflect(vdlServerShellPacketReflect)
	VDLIsZero() bool
	VDLWrite(vdl.Encoder) error
}

ServerShellPacket represents any single field of the ServerShellPacket union type.

type ServerShellPacketStderr

type ServerShellPacketStderr struct{ Value []byte }

ServerShellPacketStderr represents field Stderr of the ServerShellPacket union type.

Bytes coming from the shell's stderr.

func (ServerShellPacketStderr) Index

func (x ServerShellPacketStderr) Index() int

func (ServerShellPacketStderr) Interface

func (x ServerShellPacketStderr) Interface() interface{}

func (ServerShellPacketStderr) Name

func (ServerShellPacketStderr) VDLIsZero

func (x ServerShellPacketStderr) VDLIsZero() bool

func (ServerShellPacketStderr) VDLReflect

func (x ServerShellPacketStderr) VDLReflect(vdlServerShellPacketReflect)

func (ServerShellPacketStderr) VDLWrite

func (x ServerShellPacketStderr) VDLWrite(enc vdl.Encoder) error

type ServerShellPacketStdout

type ServerShellPacketStdout struct{ Value []byte }

ServerShellPacketStdout represents field Stdout of the ServerShellPacket union type.

Bytes coming from the shell's stdout.

func (ServerShellPacketStdout) Index

func (x ServerShellPacketStdout) Index() int

func (ServerShellPacketStdout) Interface

func (x ServerShellPacketStdout) Interface() interface{}

func (ServerShellPacketStdout) Name

func (ServerShellPacketStdout) VDLIsZero

func (x ServerShellPacketStdout) VDLIsZero() bool

func (ServerShellPacketStdout) VDLReflect

func (x ServerShellPacketStdout) VDLReflect(vdlServerShellPacketReflect)

func (ServerShellPacketStdout) VDLWrite

func (x ServerShellPacketStdout) VDLWrite(enc vdl.Encoder) error

type ShellOpts

type ShellOpts struct {
	UsePty      bool       // Whether to open a pseudo-terminal.
	Environment []string   // Environment variables to pass to the remote shell.
	WinSize     WindowSize // The size of the window.
}

func (ShellOpts) VDLIsZero

func (x ShellOpts) VDLIsZero() bool

func (*ShellOpts) VDLRead

func (x *ShellOpts) VDLRead(dec vdl.Decoder) error

func (ShellOpts) VDLReflect

func (ShellOpts) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/examples/tunnel.ShellOpts"`
})

func (ShellOpts) VDLWrite

func (x ShellOpts) VDLWrite(enc vdl.Encoder) error

type TunnelClientMethods

type TunnelClientMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to the requested network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(_ *context.T, network string, address string, _ ...rpc.CallOpt) (TunnelForwardClientCall, error)
	// The ReverseForward method is used for network forwarding from the server
	// back to the client. The server process listens on the requested network
	// address, forwarding all connections by calling Forwarder.Forward on the
	// caller.
	ReverseForward(_ *context.T, network string, address string, _ ...rpc.CallOpt) error
	// The Shell method is used to either run shell commands remotely, or to open
	// an interactive shell. The data received over the byte stream is sent to the
	// shell's stdin, and the data received from the shell's stdout and stderr is
	// sent back in the reply stream. It returns the exit status of the shell
	// command as an integer exit code and a human readable string.
	Shell(_ *context.T, command string, shellOpts ShellOpts, _ ...rpc.CallOpt) (TunnelShellClientCall, error)
}

TunnelClientMethods is the client interface containing Tunnel methods.

type TunnelClientStub

type TunnelClientStub interface {
	TunnelClientMethods
}

TunnelClientStub embeds TunnelClientMethods and is a placeholder for additional management operations.

func TunnelClient

func TunnelClient(name string) TunnelClientStub

TunnelClient returns a client stub for Tunnel.

type TunnelForwardClientCall

type TunnelForwardClientCall interface {
	TunnelForwardClientStream
	// Finish performs the equivalent of SendStream().Close, then blocks until
	// the server is done, and returns the positional return values for the call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() error
}

TunnelForwardClientCall represents the call returned from Tunnel.Forward.

type TunnelForwardClientStream

type TunnelForwardClientStream interface {
	// RecvStream returns the receiver side of the Tunnel.Forward client stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Tunnel.Forward client stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors
		// encountered while sending, or if Send is called after Close or
		// the stream has been canceled.  Blocks if there is no buffer
		// space; will unblock when buffer space is available or after
		// the stream has been canceled.
		Send(item []byte) error
		// Close indicates to the server that no more items will be sent;
		// server Recv calls will receive io.EOF after all sent items.
		// This is an optional call - e.g. a client might call Close if it
		// needs to continue receiving items from the server after it's
		// done sending.  Returns errors encountered while closing, or if
		// Close is called after the stream has been canceled.  Like Send,
		// blocks if there is no buffer space available.
		Close() error
	}
}

TunnelForwardClientStream is the client stream for Tunnel.Forward.

type TunnelForwardServerCall

type TunnelForwardServerCall interface {
	rpc.ServerCall
	TunnelForwardServerStream
}

TunnelForwardServerCall represents the context passed to Tunnel.Forward.

type TunnelForwardServerCallStub

type TunnelForwardServerCallStub struct {
	rpc.StreamServerCall
	// contains filtered or unexported fields
}

TunnelForwardServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements TunnelForwardServerCall.

func (*TunnelForwardServerCallStub) Init

Init initializes TunnelForwardServerCallStub from rpc.StreamServerCall.

func (*TunnelForwardServerCallStub) RecvStream

func (s *TunnelForwardServerCallStub) RecvStream() interface {
	Advance() bool
	Value() []byte
	Err() error
}

RecvStream returns the receiver side of the Tunnel.Forward server stream.

func (*TunnelForwardServerCallStub) SendStream

func (s *TunnelForwardServerCallStub) SendStream() interface {
	Send(item []byte) error
}

SendStream returns the send side of the Tunnel.Forward server stream.

type TunnelForwardServerStream

type TunnelForwardServerStream interface {
	// RecvStream returns the receiver side of the Tunnel.Forward server stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() []byte
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Tunnel.Forward server stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors encountered
		// while sending.  Blocks if there is no buffer space; will unblock when
		// buffer space is available.
		Send(item []byte) error
	}
}

TunnelForwardServerStream is the server stream for Tunnel.Forward.

type TunnelServerMethods

type TunnelServerMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to the requested network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(_ *context.T, _ TunnelForwardServerCall, network string, address string) error
	// The ReverseForward method is used for network forwarding from the server
	// back to the client. The server process listens on the requested network
	// address, forwarding all connections by calling Forwarder.Forward on the
	// caller.
	ReverseForward(_ *context.T, _ rpc.ServerCall, network string, address string) error
	// The Shell method is used to either run shell commands remotely, or to open
	// an interactive shell. The data received over the byte stream is sent to the
	// shell's stdin, and the data received from the shell's stdout and stderr is
	// sent back in the reply stream. It returns the exit status of the shell
	// command as an integer exit code and a human readable string.
	Shell(_ *context.T, _ TunnelShellServerCall, command string, shellOpts ShellOpts) (exitCode int32, exitMsg string, _ error)
}

TunnelServerMethods is the interface a server writer implements for Tunnel.

type TunnelServerStub

type TunnelServerStub interface {
	TunnelServerStubMethods
	// DescribeInterfaces the Tunnel interfaces.
	Describe__() []rpc.InterfaceDesc
}

TunnelServerStub adds universal methods to TunnelServerStubMethods.

func TunnelServer

func TunnelServer(impl TunnelServerMethods) TunnelServerStub

TunnelServer returns a server stub for Tunnel. It converts an implementation of TunnelServerMethods into an object that may be used by rpc.Server.

type TunnelServerStubMethods

type TunnelServerStubMethods interface {
	// The Forward method is used for network forwarding. All the data sent over
	// the byte stream is forwarded to the requested network address and all the
	// data received from that network connection is sent back on the reply
	// stream.
	Forward(_ *context.T, _ *TunnelForwardServerCallStub, network string, address string) error
	// The ReverseForward method is used for network forwarding from the server
	// back to the client. The server process listens on the requested network
	// address, forwarding all connections by calling Forwarder.Forward on the
	// caller.
	ReverseForward(_ *context.T, _ rpc.ServerCall, network string, address string) error
	// The Shell method is used to either run shell commands remotely, or to open
	// an interactive shell. The data received over the byte stream is sent to the
	// shell's stdin, and the data received from the shell's stdout and stderr is
	// sent back in the reply stream. It returns the exit status of the shell
	// command as an integer exit code and a human readable string.
	Shell(_ *context.T, _ *TunnelShellServerCallStub, command string, shellOpts ShellOpts) (exitCode int32, exitMsg string, _ error)
}

TunnelServerStubMethods is the server interface containing Tunnel methods, as expected by rpc.Server. The only difference between this interface and TunnelServerMethods is the streaming methods.

type TunnelShellClientCall

type TunnelShellClientCall interface {
	TunnelShellClientStream
	// Finish performs the equivalent of SendStream().Close, then blocks until
	// the server is done, and returns the positional return values for the call.
	//
	// Finish returns immediately if the call has been canceled; depending on the
	// timing the output could either be an error signaling cancelation, or the
	// valid positional return values from the server.
	//
	// Calling Finish is mandatory for releasing stream resources, unless the call
	// has been canceled or any of the other methods return an error.  Finish should
	// be called at most once.
	Finish() (exitCode int32, exitMsg string, _ error)
}

TunnelShellClientCall represents the call returned from Tunnel.Shell.

type TunnelShellClientStream

type TunnelShellClientStream interface {
	// RecvStream returns the receiver side of the Tunnel.Shell client stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() ServerShellPacket
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Tunnel.Shell client stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors
		// encountered while sending, or if Send is called after Close or
		// the stream has been canceled.  Blocks if there is no buffer
		// space; will unblock when buffer space is available or after
		// the stream has been canceled.
		Send(item ClientShellPacket) error
		// Close indicates to the server that no more items will be sent;
		// server Recv calls will receive io.EOF after all sent items.
		// This is an optional call - e.g. a client might call Close if it
		// needs to continue receiving items from the server after it's
		// done sending.  Returns errors encountered while closing, or if
		// Close is called after the stream has been canceled.  Like Send,
		// blocks if there is no buffer space available.
		Close() error
	}
}

TunnelShellClientStream is the client stream for Tunnel.Shell.

type TunnelShellServerCall

type TunnelShellServerCall interface {
	rpc.ServerCall
	TunnelShellServerStream
}

TunnelShellServerCall represents the context passed to Tunnel.Shell.

type TunnelShellServerCallStub

type TunnelShellServerCallStub struct {
	rpc.StreamServerCall
	// contains filtered or unexported fields
}

TunnelShellServerCallStub is a wrapper that converts rpc.StreamServerCall into a typesafe stub that implements TunnelShellServerCall.

func (*TunnelShellServerCallStub) Init

Init initializes TunnelShellServerCallStub from rpc.StreamServerCall.

func (*TunnelShellServerCallStub) RecvStream

func (s *TunnelShellServerCallStub) RecvStream() interface {
	Advance() bool
	Value() ClientShellPacket
	Err() error
}

RecvStream returns the receiver side of the Tunnel.Shell server stream.

func (*TunnelShellServerCallStub) SendStream

func (s *TunnelShellServerCallStub) SendStream() interface {
	Send(item ServerShellPacket) error
}

SendStream returns the send side of the Tunnel.Shell server stream.

type TunnelShellServerStream

type TunnelShellServerStream interface {
	// RecvStream returns the receiver side of the Tunnel.Shell server stream.
	RecvStream() interface {
		// Advance stages an item so that it may be retrieved via Value.  Returns
		// true iff there is an item to retrieve.  Advance must be called before
		// Value is called.  May block if an item is not available.
		Advance() bool
		// Value returns the item that was staged by Advance.  May panic if Advance
		// returned false or was not called.  Never blocks.
		Value() ClientShellPacket
		// Err returns any error encountered by Advance.  Never blocks.
		Err() error
	}
	// SendStream returns the send side of the Tunnel.Shell server stream.
	SendStream() interface {
		// Send places the item onto the output stream.  Returns errors encountered
		// while sending.  Blocks if there is no buffer space; will unblock when
		// buffer space is available.
		Send(item ServerShellPacket) error
	}
}

TunnelShellServerStream is the server stream for Tunnel.Shell.

type Unused

type Unused struct {
}

TODO(toddw): Replace Unused with the unnamed empty struct{}.

func (Unused) VDLIsZero

func (x Unused) VDLIsZero() bool

func (*Unused) VDLRead

func (x *Unused) VDLRead(dec vdl.Decoder) error

func (Unused) VDLReflect

func (Unused) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/examples/tunnel.Unused"`
})

func (Unused) VDLWrite

func (x Unused) VDLWrite(enc vdl.Encoder) error

type WindowSize

type WindowSize struct {
	Rows uint16
	Cols uint16
}

func (WindowSize) VDLIsZero

func (x WindowSize) VDLIsZero() bool

func (*WindowSize) VDLRead

func (x *WindowSize) VDLRead(dec vdl.Decoder) error

func (WindowSize) VDLReflect

func (WindowSize) VDLReflect(struct {
	Name string `vdl:"v.io/x/ref/examples/tunnel.WindowSize"`
})

func (WindowSize) VDLWrite

func (x WindowSize) VDLWrite(enc vdl.Encoder) error

Directories

Path Synopsis
Package internal defines common types and functions used by both tunnel clients and servers.
Package internal defines common types and functions used by both tunnel clients and servers.
Command tunneld runs the tunneld daemon, which implements the Tunnel interface.
Command tunneld runs the tunneld daemon, which implements the Tunnel interface.
Command vsh runs the Vanadium shell, a Tunnel client that can be used to run shell commands or start an interactive shell on a remote tunneld server.
Command vsh runs the Vanadium shell, a Tunnel client that can be used to run shell commands or start an interactive shell on a remote tunneld server.

Jump to

Keyboard shortcuts

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