Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildContext ¶ added in v0.3.0
type ChildContext struct { // PID of the child, can be used for ns-entering to the child namespaces. PID int // IP of the tap device IP net.IP }
ChildContext is used for RunParentDriver
type ChildDriver ¶ added in v0.3.0
type Manager ¶
type Manager interface { AddPort(ctx context.Context, spec Spec) (*Status, error) ListPorts(ctx context.Context) ([]Status, error) RemovePort(ctx context.Context, id int) error }
Manager MUST be thread-safe.
type ParentDriver ¶
type ParentDriver interface { Manager // OpaqueForChild typically consists of socket path // for controlling child from parent OpaqueForChild() map[string]string // RunParentDriver signals initComplete when ParentDriver is ready to // serve as Manager. // RunParentDriver blocks until quit is signaled. // // ChildContext is optional. RunParentDriver(initComplete chan struct{}, quit <-chan struct{}, cctx *ChildContext) error }
ParentDriver is a driver for the parent process.
type Spec ¶
type Spec struct { Proto string `json:"proto,omitempty"` // either "tcp" or "udp". in future "sctp" will be supported as well. ParentIP string `json:"parentIP,omitempty"` // IPv4 address. can be empty (0.0.0.0). ParentPort int `json:"parentPort,omitempty"` ChildPort int `json:"childPort,omitempty"` }
Directories ¶
Path | Synopsis |
---|---|
parent/udp/udpproxy
Package udpproxy is from https://raw.githubusercontent.com/docker/libnetwork/fec6476dfa21380bf8ee4d74048515d968c1ee63/cmd/proxy/udp_proxy.go
|
Package udpproxy is from https://raw.githubusercontent.com/docker/libnetwork/fec6476dfa21380bf8ee4d74048515d968c1ee63/cmd/proxy/udp_proxy.go |
Click to show internal directories.
Click to hide internal directories.