imgmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image added in v0.4.0

type Image struct {
	*api.Image
	// contains filtered or unexported fields
}

func NewImage added in v0.4.0

func NewImage(obj *api.Image, c *client.Client) (*Image, error)

func WrapImage added in v0.4.0

func WrapImage(obj *api.Image) *Image

WrapImage wraps an API type in the runtime object It does not do any validation or checking like NewImage, hence it should only be used for "safe" data coming from storage.

func (*Image) AddFiles added in v0.4.0

func (md *Image) AddFiles(src source.Source) error

AddFiles copies the contents of the tar file into the ext4 filesystem

func (*Image) AllocateAndFormat added in v0.4.0

func (md *Image) AllocateAndFormat() error

func (*Image) ObjectPath added in v0.4.0

func (img *Image) ObjectPath() string

func (*Image) Save added in v0.4.0

func (img *Image) Save() error

func (*Image) SetupResolvConf added in v0.4.0

func (md *Image) SetupResolvConf(tempDir string) error

SetupResolvConf makes sure there is a resolv.conf file, otherwise name resolution won't work. The kernel uses DHCP by default, and puts the nameservers in /proc/net/pnp at runtime. Hence, as a default, if /etc/resolv.conf doesn't exist, we can use /proc/net/pnp as /etc/resolv.conf

Jump to

Keyboard shortcuts

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