Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel is a Sandwich tunnel.
func NewTunnel ¶
func NewTunnel(ctx *TunnelContext, tunnelIO TunnelIO, configuration *api.TunnelConfiguration) (*Tunnel, error)
NewTunnel creates a Sandwich tunnel from a context, an io and a configuration.
func NewTunnelWithReadWriter ¶
func NewTunnelWithReadWriter(ctx *TunnelContext, readWriter io.ReadWriter, configuration *api.TunnelConfiguration) (*Tunnel, error)
NewTunnelWithReadWriter creates a Sandwich tunnel using a simple `io.ReadWriter` interface.
func (*Tunnel) Handshake ¶
Handshakes performs or resumes the handshake stage. If nil is returned, it means the handshake is done.
type TunnelContext ¶
type TunnelContext struct {
// contains filtered or unexported fields
}
TunnelContext is a Sandwich context for tunnels.
func NewTunnelContext ¶
func NewTunnelContext(handle *sw.Sandwich, configuration *api.Configuration) (*TunnelContext, error)
NewTunnelContext fills a Sandwich context from a protobuf configuration.
type TunnelIO ¶
type TunnelIO interface { // TunnelIO is an io.ReadWriter. io.ReadWriter // SetState sets the state of the tunnel. // // It is guaranteed that the state of the tunnel will not change between // two calls to SetState. SetState(tunnel_state pb.State) }
TunnelIO represents the I/O interface used by tunnels in Sandwich.
Click to show internal directories.
Click to hide internal directories.