vsock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(path string, port uint32, opts ...DialOption) (net.Conn, error)

Dial connects to the Firecracker host-side vsock at the provided unix path and port.

See func Dial for a description of the path and port parameters.

func DialContext

func DialContext(ctx context.Context, path string, port uint32, opts ...DialOption) (net.Conn, error)

Dial connects to the Firecracker host-side vsock at the provided unix path and port.

It will retry connect attempts if a temporary error is encountered up to a fixed timeout or the provided request is canceled.

path specifies the file system path of the UNIX domain socket.

port will be used in the connect message to the firecracker vsock.

func Listener

func Listener(ctx context.Context, logger *logrus.Entry, port uint32) (net.Listener, error)

Listener returns a net.Listener implementation for guest-side Firecracker vsock connections.

Types

type DialOption

type DialOption func(c *config)

func WithAckMsgTimeout

func WithAckMsgTimeout(d time.Duration) DialOption

func WithConnectionMsgTimeout

func WithConnectionMsgTimeout(d time.Duration) DialOption

func WithDialTimeout

func WithDialTimeout(d time.Duration) DialOption

func WithLogger

func WithLogger(logger logrus.FieldLogger) DialOption

func WithRetryInterval

func WithRetryInterval(d time.Duration) DialOption

func WithRetryTimeout

func WithRetryTimeout(d time.Duration) DialOption

Jump to

Keyboard shortcuts

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