v.io: v.io/x/ref/examples/tunnel Index | Files | Directories

package tunnel

import "v.io/x/ref/examples/tunnel"

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

Index

Package Files

tunnel.vdl.go

Variables

var ForwarderDesc rpc.InterfaceDesc = descForwarder

ForwarderDesc describes the Forwarder interface.

var TunnelDesc rpc.InterfaceDesc = descTunnel

TunnelDesc describes the Tunnel interface.

func VDLReadClientShellPacket Uses

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

func VDLReadServerShellPacket Uses

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

type ClientShellPacket Uses

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 Uses

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 Uses

func (x ClientShellPacketEndOfFile) Index() int

func (ClientShellPacketEndOfFile) Interface Uses

func (x ClientShellPacketEndOfFile) Interface() interface{}

func (ClientShellPacketEndOfFile) Name Uses

func (x ClientShellPacketEndOfFile) Name() string

func (ClientShellPacketEndOfFile) VDLIsZero Uses

func (x ClientShellPacketEndOfFile) VDLIsZero() bool

func (ClientShellPacketEndOfFile) VDLReflect Uses

func (x ClientShellPacketEndOfFile) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketEndOfFile) VDLWrite Uses

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

type ClientShellPacketStdin Uses

type ClientShellPacketStdin struct{ Value []byte }

ClientShellPacketStdin represents field Stdin of the ClientShellPacket union type.

Bytes going to the shell's stdin.

func (ClientShellPacketStdin) Index Uses

func (x ClientShellPacketStdin) Index() int

func (ClientShellPacketStdin) Interface Uses

func (x ClientShellPacketStdin) Interface() interface{}

func (ClientShellPacketStdin) Name Uses

func (x ClientShellPacketStdin) Name() string

func (ClientShellPacketStdin) VDLIsZero Uses

func (x ClientShellPacketStdin) VDLIsZero() bool

func (ClientShellPacketStdin) VDLReflect Uses

func (x ClientShellPacketStdin) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketStdin) VDLWrite Uses

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

type ClientShellPacketWinSize Uses

type ClientShellPacketWinSize struct{ Value WindowSize }

ClientShellPacketWinSize represents field WinSize of the ClientShellPacket union type.

A dynamic update of the window size.

func (ClientShellPacketWinSize) Index Uses

func (x ClientShellPacketWinSize) Index() int

func (ClientShellPacketWinSize) Interface Uses

func (x ClientShellPacketWinSize) Interface() interface{}

func (ClientShellPacketWinSize) Name Uses

func (x ClientShellPacketWinSize) Name() string

func (ClientShellPacketWinSize) VDLIsZero Uses

func (x ClientShellPacketWinSize) VDLIsZero() bool

func (ClientShellPacketWinSize) VDLReflect Uses

func (x ClientShellPacketWinSize) VDLReflect(vdlClientShellPacketReflect)

func (ClientShellPacketWinSize) VDLWrite Uses

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

type ForwarderClientMethods Uses

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 Uses

type ForwarderClientStub interface {
    ForwarderClientMethods
}

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

func ForwarderClient Uses

func ForwarderClient(name string) ForwarderClientStub

ForwarderClient returns a client stub for Forwarder.

type ForwarderForwardClientCall Uses

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 Uses

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 Uses

type ForwarderForwardServerCall interface {
    rpc.ServerCall
    ForwarderForwardServerStream
}

ForwarderForwardServerCall represents the context passed to Forwarder.Forward.

type ForwarderForwardServerCallStub Uses

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 Uses

func (s *ForwarderForwardServerCallStub) Init(call rpc.StreamServerCall)

Init initializes ForwarderForwardServerCallStub from rpc.StreamServerCall.

func (*ForwarderForwardServerCallStub) RecvStream Uses

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 Uses

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

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

type ForwarderForwardServerStream Uses

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 Uses

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 Uses

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

ForwarderServerStub adds universal methods to ForwarderServerStubMethods.

func ForwarderServer Uses

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 Uses

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 Uses

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 Uses

type ServerShellPacketStderr struct{ Value []byte }

ServerShellPacketStderr represents field Stderr of the ServerShellPacket union type.

Bytes coming from the shell's stderr.

func (ServerShellPacketStderr) Index Uses

func (x ServerShellPacketStderr) Index() int

func (ServerShellPacketStderr) Interface Uses

func (x ServerShellPacketStderr) Interface() interface{}

func (ServerShellPacketStderr) Name Uses

func (x ServerShellPacketStderr) Name() string

func (ServerShellPacketStderr) VDLIsZero Uses

func (x ServerShellPacketStderr) VDLIsZero() bool

func (ServerShellPacketStderr) VDLReflect Uses

func (x ServerShellPacketStderr) VDLReflect(vdlServerShellPacketReflect)

func (ServerShellPacketStderr) VDLWrite Uses

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

type ServerShellPacketStdout Uses

type ServerShellPacketStdout struct{ Value []byte }

ServerShellPacketStdout represents field Stdout of the ServerShellPacket union type.

Bytes coming from the shell's stdout.

func (ServerShellPacketStdout) Index Uses

func (x ServerShellPacketStdout) Index() int

func (ServerShellPacketStdout) Interface Uses

func (x ServerShellPacketStdout) Interface() interface{}

func (ServerShellPacketStdout) Name Uses

func (x ServerShellPacketStdout) Name() string

func (ServerShellPacketStdout) VDLIsZero Uses

func (x ServerShellPacketStdout) VDLIsZero() bool

func (ServerShellPacketStdout) VDLReflect Uses

func (x ServerShellPacketStdout) VDLReflect(vdlServerShellPacketReflect)

func (ServerShellPacketStdout) VDLWrite Uses

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

type ShellOpts Uses

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 Uses

func (x ShellOpts) VDLIsZero() bool

func (*ShellOpts) VDLRead Uses

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

func (ShellOpts) VDLReflect Uses

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

func (ShellOpts) VDLWrite Uses

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

type TunnelClientMethods Uses

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 Uses

type TunnelClientStub interface {
    TunnelClientMethods
}

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

func TunnelClient Uses

func TunnelClient(name string) TunnelClientStub

TunnelClient returns a client stub for Tunnel.

type TunnelForwardClientCall Uses

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 Uses

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 Uses

type TunnelForwardServerCall interface {
    rpc.ServerCall
    TunnelForwardServerStream
}

TunnelForwardServerCall represents the context passed to Tunnel.Forward.

type TunnelForwardServerCallStub Uses

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 Uses

func (s *TunnelForwardServerCallStub) Init(call rpc.StreamServerCall)

Init initializes TunnelForwardServerCallStub from rpc.StreamServerCall.

func (*TunnelForwardServerCallStub) RecvStream Uses

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 Uses

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

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

type TunnelForwardServerStream Uses

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 Uses

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 Uses

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

TunnelServerStub adds universal methods to TunnelServerStubMethods.

func TunnelServer Uses

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 Uses

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 Uses

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 Uses

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 Uses

type TunnelShellServerCall interface {
    rpc.ServerCall
    TunnelShellServerStream
}

TunnelShellServerCall represents the context passed to Tunnel.Shell.

type TunnelShellServerCallStub Uses

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 Uses

func (s *TunnelShellServerCallStub) Init(call rpc.StreamServerCall)

Init initializes TunnelShellServerCallStub from rpc.StreamServerCall.

func (*TunnelShellServerCallStub) RecvStream Uses

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 Uses

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

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

type TunnelShellServerStream Uses

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 Uses

type Unused struct {
}

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

func (Unused) VDLIsZero Uses

func (x Unused) VDLIsZero() bool

func (*Unused) VDLRead Uses

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

func (Unused) VDLReflect Uses

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

func (Unused) VDLWrite Uses

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

type WindowSize Uses

type WindowSize struct {
    Rows uint16
    Cols uint16
}

func (WindowSize) VDLIsZero Uses

func (x WindowSize) VDLIsZero() bool

func (*WindowSize) VDLRead Uses

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

func (WindowSize) VDLReflect Uses

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

func (WindowSize) VDLWrite Uses

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

Directories

PathSynopsis
internalPackage internal defines common types and functions used by both tunnel clients and servers.
tunneldCommand tunneld runs the tunneld daemon, which implements the Tunnel interface.
vshCommand 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.

Package tunnel imports 7 packages (graph) and is imported by 6 packages. Updated 2020-10-24. Refresh now. Tools for package owners.