package transport
import "github.com/Microsoft/hcsshim/internal/guest/transport"
Package transport defines the interfaces describing a connection-like data transport mechanism.
Index ¶
Types ¶
type Connection ¶
type Connection interface { io.ReadWriteCloser CloseRead() error CloseWrite() error File() (*os.File, error) }
Connection is the interface defining a data connection, such as a socket or a mocked implementation.
type DevNullTransport ¶
type DevNullTransport struct{}
DevNullTransport is a transport that will:
For reads: return either closed or EOF for as appropriate. For writers: return either closed or throw away the write as appropriate.
The DevNullTransport is used as the container logging transport when stdio access is denied. It is also used for non-terminal external processes (aka a process run in the UVM) when stdio access is denied.
func (*DevNullTransport) Dial ¶
func (t *DevNullTransport) Dial(fd uint32) (Connection, error)
type Transport ¶
type Transport interface { // Dial takes a port number and returns a connected connection. Dial(port uint32) (Connection, error) }
Transport is the interface defining a method of transporting data in a connection-like way. Examples of a Transport implementation could be:
-Hyper-V socket transport -TCP/IP socket transport -Mocked-out local transport
type VsockTransport ¶
type VsockTransport struct{}
VsockTransport is an implementation of Transport which uses vsock sockets.
func (*VsockTransport) Dial ¶
func (t *VsockTransport) Dial(port uint32) (Connection, error)
Dial accepts a vsock socket port number as configuration, and returns an unconnected VsockConnection struct.
Source Files ¶
devnull.go doc.go transport.go vsock.go
- Version
- v0.12.9 (latest)
- Published
- Oct 30, 2024
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 1 day ago –
Tools for package owners.