Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultInterface = "eth0" // FIXME: Discover the veth endpoint name instead of using default "eth0". See: https://github.com/urunc-dev/urunc/issues/14 DefaultTap = "tapX_urunc" )
Variables ¶
View Source
var StaticIPAddr = fmt.Sprintf("%s/24", constants.StaticNetworkTapIP)
Functions ¶
Types ¶
type DynamicNetwork ¶
type DynamicNetwork struct {
}
func (DynamicNetwork) NetworkSetup ¶
func (n DynamicNetwork) NetworkSetup(uid uint32, gid uint32) (*UnikernelNetworkInfo, error)
NetworkSetup checks if any tap device is available in the current netns. If it is, it assumes a running unikernel is present in the current netns and returns an error, because network functionality for more than one unikernels is not yet implemented. If no TAP devices are available in the current netns, it creates a new tap device and sets TC rules between the veth interface and the tap device inside the namespace.
FIXME: CUrrently only one tap device per netns can provide functional networking. We need to find a proper way to handle networking for multiple unikernels in the same pod/network namespace. See: https://github.com/urunc-dev/urunc/issues/13
type Manager ¶
type Manager interface {
NetworkSetup(uid uint32, gid uint32) (*UnikernelNetworkInfo, error)
}
func NewNetworkManager ¶
type StaticNetwork ¶
type StaticNetwork struct {
}
func (StaticNetwork) NetworkSetup ¶
func (n StaticNetwork) NetworkSetup(uid uint32, gid uint32) (*UnikernelNetworkInfo, error)
type UnikernelNetworkInfo ¶
Click to show internal directories.
Click to hide internal directories.