rlkclient

package
v0.0.0-...-b7543ad Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortDriverClient

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

func NewPortDriverClient

func NewPortDriverClient(ctx context.Context) (*PortDriverClient, error)

func (*PortDriverClient) AddPort

func (c *PortDriverClient) AddPort(
	ctx context.Context,
	proto string,
	hostIP netip.Addr,
	childIP netip.Addr,
	hostPort int,
) (func() error, error)

AddPort makes a request to RootlessKit asking it to set up a port mapping between a host IP address and a child host IP address.

func (*PortDriverClient) ChildHostIP

func (c *PortDriverClient) ChildHostIP(hostIP netip.Addr) netip.Addr

ChildHostIP returns the address that must be used in the child network namespace in place of hostIP, a host IP address. In particular, port mappings from host IP addresses, and DNAT rules, must use this child address in place of the real host address.

Jump to

Keyboard shortcuts

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