socket

package
v0.0.0-...-39278d5 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAllocatedSocketIO

func NewAllocatedSocketIO(ctx context.Context, stdin, stdout, stderr runtime.AllocatedSocket) runtime.IO

func NewRemotePTYConsoleAdapter

func NewRemotePTYConsoleAdapter(ctx context.Context, wrcon io.ReadWriteCloser, resizeFunc func(ctx context.Context, winSize console.WinSize) error) (console.Console, error)

NewPTYConsoleAdapter creates a new adapter that bridges your ReadWriteCloser to a containerd console

Types

type GuestAllocatedUnixSocket

type GuestAllocatedUnixSocket struct {
	// contains filtered or unexported fields
}

func NewGuestAllocatedUnixSocket

func NewGuestAllocatedUnixSocket(ctx context.Context, path string) (*GuestAllocatedUnixSocket, error)

func (*GuestAllocatedUnixSocket) Close

func (g *GuestAllocatedUnixSocket) Close() error

func (*GuestAllocatedUnixSocket) Conn

func (g *GuestAllocatedUnixSocket) Conn() net.Conn

func (*GuestAllocatedUnixSocket) DialContext

func (g *GuestAllocatedUnixSocket) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*GuestAllocatedUnixSocket) Path

func (g *GuestAllocatedUnixSocket) Path() string

func (*GuestAllocatedUnixSocket) Ready

func (g *GuestAllocatedUnixSocket) Ready() error

type GuestAllocatedVsockSocket

type GuestAllocatedVsockSocket struct {
	// contains filtered or unexported fields
}

func NewGuestAllocatedVsockSocket

func NewGuestAllocatedVsockSocket(ctx context.Context, cid uint32, port uint32) (*GuestAllocatedVsockSocket, error)

func (*GuestAllocatedVsockSocket) Close

func (g *GuestAllocatedVsockSocket) Close() error

func (*GuestAllocatedVsockSocket) Conn

func (*GuestAllocatedVsockSocket) DialContext

func (g *GuestAllocatedVsockSocket) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*GuestAllocatedVsockSocket) Port

func (*GuestAllocatedVsockSocket) Ready

func (g *GuestAllocatedVsockSocket) Ready() error

type GuestUnixSocketAllocator

type GuestUnixSocketAllocator struct {
	// contains filtered or unexported fields
}

func NewGuestUnixSocketAllocator

func NewGuestUnixSocketAllocator(socketDir string) *GuestUnixSocketAllocator

func (*GuestUnixSocketAllocator) AllocateSocket

AllocateSocket implements SocketAllocator.

type GuestVsockSocketAllocator

type GuestVsockSocketAllocator struct {
	// contains filtered or unexported fields
}

func NewGuestVsockSocketAllocatorPrettySureUnused

func NewGuestVsockSocketAllocatorPrettySureUnused(cid uint32, basePort uint32) *GuestVsockSocketAllocator

func (*GuestVsockSocketAllocator) AllocateSocket

type PathConsoleSocket

type PathConsoleSocket struct {
	// contains filtered or unexported fields
}

the point of this thing is to provide runc with a valid Path() and then connect a console to that path via

a unix socket

func NewGuestPathProviderConsoleSocket

func NewGuestPathProviderConsoleSocket() *PathConsoleSocket

func (*PathConsoleSocket) BindToAllocatedSocket

func (g *PathConsoleSocket) BindToAllocatedSocket(ctx context.Context, sock runtime.AllocatedSocket) error

func (*PathConsoleSocket) Close

func (g *PathConsoleSocket) Close() error

func (*PathConsoleSocket) Path

func (g *PathConsoleSocket) Path() string

func (*PathConsoleSocket) ReceiveMaster

func (g *PathConsoleSocket) ReceiveMaster() (console.Console, error)

type RemoteConsole

type RemoteConsole struct {
	// contains filtered or unexported fields
}

PTYConsoleAdapter wraps a ReadWriteCloser and presents it as a containerd/console

func (*RemoteConsole) Close

func (a *RemoteConsole) Close() error

Close shuts down the adapter

func (*RemoteConsole) DisableEcho

func (r *RemoteConsole) DisableEcho() error

DisableEcho implements runtime.RuntimeConsole.

func (*RemoteConsole) Fd

func (r *RemoteConsole) Fd() uintptr

Fd implements runtime.RuntimeConsole.

func (*RemoteConsole) Name

func (r *RemoteConsole) Name() string

Name implements runtime.RuntimeConsole.

func (*RemoteConsole) Read

func (r *RemoteConsole) Read(p []byte) (n int, err error)

Read implements runtime.RuntimeConsole.

func (*RemoteConsole) Reset

func (r *RemoteConsole) Reset() error

Reset implements runtime.RuntimeConsole.

func (*RemoteConsole) Resize

func (r *RemoteConsole) Resize(sz console.WinSize) error

Resize implements runtime.RuntimeConsole.

func (*RemoteConsole) ResizeFrom

func (r *RemoteConsole) ResizeFrom(rc console.Console) error

ResizeFrom implements runtime.RuntimeConsole.

func (*RemoteConsole) SetRaw

func (r *RemoteConsole) SetRaw() error

SetRaw implements runtime.RuntimeConsole.

func (*RemoteConsole) Size

func (r *RemoteConsole) Size() (console.WinSize, error)

Size implements runtime.RuntimeConsole.

func (*RemoteConsole) TTYPath

func (a *RemoteConsole) TTYPath() string

PTYSlavePath returns the path to the PTY slave (for runc --console-socket)

func (*RemoteConsole) Write

func (r *RemoteConsole) Write(p []byte) (n int, err error)

Write implements runtime.RuntimeConsole.

type RemoteConsoleSocket

type RemoteConsoleSocket struct {
	// contains filtered or unexported fields
}

func NewHostUnixConsoleSocketV2

func NewHostUnixConsoleSocketV2(ctx context.Context, referenceId string, socket runtime.AllocatedSocket, resizeFunc func(ctx context.Context, winSize console.WinSize) error, closeCallbacks ...func(ctx context.Context) error) (*RemoteConsoleSocket, error)

func (*RemoteConsoleSocket) Close

func (h *RemoteConsoleSocket) Close() error

func (*RemoteConsoleSocket) Conn

func (h *RemoteConsoleSocket) Conn() net.Conn

func (*RemoteConsoleSocket) GetReferenceId

func (h *RemoteConsoleSocket) GetReferenceId() string

func (*RemoteConsoleSocket) Path

func (h *RemoteConsoleSocket) Path() string

func (*RemoteConsoleSocket) ReceiveMaster

func (h *RemoteConsoleSocket) ReceiveMaster() (console.Console, error)

type SimpleUnixConn

type SimpleUnixConn struct {
	// contains filtered or unexported fields
}

func NewSimpleUnixConn

func NewSimpleUnixConn(ctx context.Context, conn *net.UnixConn, path string) *SimpleUnixConn

func (*SimpleUnixConn) Close

func (h *SimpleUnixConn) Close() error

func (*SimpleUnixConn) Conn

func (h *SimpleUnixConn) Conn() net.Conn

func (*SimpleUnixConn) DialContext

func (h *SimpleUnixConn) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*SimpleUnixConn) Path

func (h *SimpleUnixConn) Path() string

func (*SimpleUnixConn) Ready

func (h *SimpleUnixConn) Ready() error

type SimpleVsockConn

type SimpleVsockConn struct {
	// contains filtered or unexported fields
}

func NewSimpleVsockConn

func NewSimpleVsockConn(ctx context.Context, conn *vsock.Conn, port uint32) *SimpleVsockConn

func (*SimpleVsockConn) Close

func (h *SimpleVsockConn) Close() error

func (*SimpleVsockConn) Conn

func (h *SimpleVsockConn) Conn() net.Conn

func (*SimpleVsockConn) DialContext

func (h *SimpleVsockConn) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*SimpleVsockConn) Port

func (h *SimpleVsockConn) Port() uint32

func (*SimpleVsockConn) Ready

func (h *SimpleVsockConn) Ready() error

type SimpleVsockProxyConn

type SimpleVsockProxyConn struct {
	// contains filtered or unexported fields
}

func CreateLocalVsockProxyConn

func CreateLocalVsockProxyConn(ctx context.Context, con *SimpleVsockConn) (*SimpleVsockProxyConn, error)

func NewSimpleVsockProxyConn

func NewSimpleVsockProxyConn(ctx context.Context, conn net.Conn, port uint32) *SimpleVsockProxyConn

func (*SimpleVsockProxyConn) Close

func (h *SimpleVsockProxyConn) Close() error

func (*SimpleVsockProxyConn) Conn

func (h *SimpleVsockProxyConn) Conn() net.Conn

func (*SimpleVsockProxyConn) DialContext

func (h *SimpleVsockProxyConn) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*SimpleVsockProxyConn) Port

func (h *SimpleVsockProxyConn) Port() uint32

func (*SimpleVsockProxyConn) Ready

func (h *SimpleVsockProxyConn) Ready() error

Jump to

Keyboard shortcuts

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