package rlkclient

import "github.com/dotcloud/docker/libnetwork/drivers/bridge/internal/rlkclient"

Index

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.

Source Files

rootlesskit_client_linux.go

Version
v28.0.0-rc.1+incompatible
Published
Feb 6, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
6 seconds ago

Tools for package owners.