idtools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2017 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMapping

func ParseMapping(spec string) (rspec.IDMapping, error)

ParseMapping takes a mapping string of the form "host:container[:size]" and returns the corresponding rspec.IDMapping. An error is returned if not enough fields are provided or are otherwise invalid. The default size is 1.

func ToContainer

func ToContainer(hostID int, idMap []rspec.IDMapping) (int, error)

ToContainer takes an unmapped host ID and translates it to a remapped container ID using the provided ID mapping. If no mapping is provided, then the mapping is a no-op. If there is no mapping for the given ID an error is returned.

func ToHost

func ToHost(contID int, idMap []rspec.IDMapping) (int, error)

ToHost translates a remapped container ID to an unmapped host ID using the provided ID mapping. If no mapping is provided, then the mapping is a no-op. If there is no mapping for the given ID an error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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