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.

AddPort may return ProtocolUnsupportedError.

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.

type ProtocolUnsupportedError

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

ProtocolUnsupportedError is returned when apiProto is not supported by portDriverName.

func (*ProtocolUnsupportedError) Error

func (e *ProtocolUnsupportedError) Error() string

Source Files

rootlesskit_client_linux.go

Version
v28.1.1+incompatible (latest)
Published
Apr 18, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
1 day ago

Tools for package owners.