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.
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
Click to show internal directories.
Click to hide internal directories.