Documentation
¶
Index ¶
- type GRPCServerRW
- func (g *GRPCServerRW) Close() error
- func (g *GRPCServerRW) CloseRead() error
- func (g *GRPCServerRW) CloseWrite() error
- func (g *GRPCServerRW) LocalAddr() net.Addr
- func (g *GRPCServerRW) Read(p []byte) (n int, err error)
- func (g *GRPCServerRW) RemoteAddr() net.Addr
- func (g *GRPCServerRW) SetDeadline(_ time.Time) error
- func (g *GRPCServerRW) SetReadDeadline(_ time.Time) error
- func (g *GRPCServerRW) SetWriteDeadline(_ time.Time) error
- func (g *GRPCServerRW) Write(p []byte) (n int, err error)
- type TunnelServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCServerRW ¶
type GRPCServerRW struct {
// contains filtered or unexported fields
}
func (*GRPCServerRW) Close ¶
func (g *GRPCServerRW) Close() error
func (*GRPCServerRW) CloseRead ¶
func (g *GRPCServerRW) CloseRead() error
CloseRead is called once the host stops sending, which happens both when it shuts down its write side and when it closes the connection outright. Both reach us as io.EOF from stream.Recv, and only the latter also cancels the stream context. Ending the tunnel here would therefore turn every half-close into a full close and discard the response the host is still waiting for. The proxy shuts down the write side of the guest connection by itself, so there is nothing left to do: the tunnel lives on until the guest service closes (CloseWrite) or the host cancels the stream (Close).
func (*GRPCServerRW) CloseWrite ¶
func (g *GRPCServerRW) CloseWrite() error
CloseWrite is called once the guest service closes its side. The tunnel protocol cannot signal a half-close towards the host, so this ends the whole tunnel; the host then sees the stream end and shuts down the write side of its own connection.
func (*GRPCServerRW) LocalAddr ¶
func (g *GRPCServerRW) LocalAddr() net.Addr
func (*GRPCServerRW) RemoteAddr ¶
func (g *GRPCServerRW) RemoteAddr() net.Addr
func (*GRPCServerRW) SetDeadline ¶
func (g *GRPCServerRW) SetDeadline(_ time.Time) error
func (*GRPCServerRW) SetReadDeadline ¶
func (g *GRPCServerRW) SetReadDeadline(_ time.Time) error
func (*GRPCServerRW) SetWriteDeadline ¶
func (g *GRPCServerRW) SetWriteDeadline(_ time.Time) error
type TunnelServer ¶
type TunnelServer struct{}
func NewTunnelServer ¶
func NewTunnelServer() *TunnelServer
func (*TunnelServer) Start ¶
func (s *TunnelServer) Start(stream api.GuestService_TunnelServer) error