network

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostPortPublisher

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

HostPortPublisher manages host mode port publishing using iptables

func NewHostPortPublisher

func NewHostPortPublisher() *HostPortPublisher

NewHostPortPublisher creates a new host port publisher

func (*HostPortPublisher) GetPublishedPorts

func (p *HostPortPublisher) GetPublishedPorts(taskID string) []types.PortMapping

GetPublishedPorts returns the ports currently published for a task

func (*HostPortPublisher) PublishPorts

func (p *HostPortPublisher) PublishPorts(taskID, containerIP string, ports []types.PortMapping) error

PublishPorts sets up iptables rules to forward host ports to container ports This implements "host mode" where ports are published only on the node running the task

func (*HostPortPublisher) UnpublishPorts

func (p *HostPortPublisher) UnpublishPorts(taskID string) error

UnpublishPorts removes iptables rules for a task's published ports

Jump to

Keyboard shortcuts

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