Tank.Pod.Network (Tank v0.1.0)

Copy Markdown View Source

A pod's network namespace: a set of interfaces plus pod-level DNS (one /etc/resolv.conf per netns). Loopback is always raised by the runtime.

As a whole, a pod's :network may instead be the atom :host (share the host's network namespace) or :none (an isolated netns, loopback only); those shortcuts are handled by Tank.Pod, not here.

Summary

Functions

Build a validated pod network from a map or keyword list.

Like new/1 but raises ArgumentError on invalid input.

Types

t()

@type t() :: %Tank.Pod.Network{dns: [String.t()], nics: [Tank.Nic.t()]}

Functions

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, term()}

Build a validated pod network from a map or keyword list.

new!(attrs)

@spec new!(map() | keyword()) :: t()

Like new/1 but raises ArgumentError on invalid input.