appc

package
v0.0.0-...-21b60f4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when acbuild is asked to remove an element from a
	// list and the element is not present in the list
	ErrNotFound = fmt.Errorf("element to be removed does not exist in this ACI")
)

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

Manifest is a struct with an open handle to a manifest that it can manipulate

func LoadManifest

func LoadManifest(aciPath string) (*Manifest, error)

LoadManifest will read in the manifest from an untarred ACI on disk at location aciPath, and return a new Manifest struct to manipulate it.

func (*Manifest) AddAnnotation

func (m *Manifest) AddAnnotation(name, value string) error

AddAnnotation adds an annotation of name and value to the current manifest

func (*Manifest) AddDependency

func (m *Manifest) AddDependency(imageName types.ACIdentifier, imageId *types.Hash, labels types.Labels, size uint) error

AddDependency will add a dependency with the given name, id, labels, and size to the untarred ACI stored at a.CurrentImagePath. If the dependency already exists its fields will be updated to the new values.

func (*Manifest) AddEnv

func (m *Manifest) AddEnv(name, value string) error

AddEnv will add an environment variable of name and value to the current manifest

func (*Manifest) AddIsolator

func (m *Manifest) AddIsolator(name string, value []byte) error

AddIsolator adds an isolator of name and value to the current manifest

func (*Manifest) AddLabel

func (m *Manifest) AddLabel(name, value string) error

AddLabel will add a label with the given name and value to the untarred ACI stored at a.CurrentImagePath. If the label already exists its value will be updated to the new value.

func (*Manifest) AddMount

func (m *Manifest) AddMount(name, path string, readOnly bool) error

AddMount will add a mount point with the given name and path to the untarred ACI stored at a.CurrentImagePath. If the mount point already exists its value will be updated to the new value. readOnly signifies whether or not the mount point should be read only.

func (*Manifest) AddPort

func (m *Manifest) AddPort(name, protocol string, port, count uint, socketActivated bool) error

AddPort will add a port with the given name, protocol, port, and count to the untarred ACI stored at a.CurrentImagePath. If the port already exists its value will be updated to the new value. socketActivated signifies whether or not the application will be socket activated via this port.

func (*Manifest) Get

func (m *Manifest) Get() *schema.ImageManifest

Get returns the manifest currently being manipulated

func (*Manifest) GetAnnotations

func (m *Manifest) GetAnnotations() (map[string]string, error)

func (*Manifest) Print

func (m *Manifest) Print(w io.Writer, prettyPrint, printConfig bool) error

Print will print out the current manifest to stdout, optionally inserting whitespace to improve readability

func (*Manifest) RemoveAnnotation

func (m *Manifest) RemoveAnnotation(name string) error

RemoveAnnotation removes an annotation of name from the current manifest

func (*Manifest) RemoveDependency

func (m *Manifest) RemoveDependency(imageName string) error

RemoveDependency will remove the dependency with the given name from the untarred ACI stored at a.CurrentImagePath.

func (*Manifest) RemoveEnv

func (m *Manifest) RemoveEnv(name string) error

Remove Env will remove an environment variable of name from the current manifest

func (*Manifest) RemoveIsolator

func (m *Manifest) RemoveIsolator(name string) error

RemoveIsolator removes an isolator of name from the current manifest

func (*Manifest) RemoveLabel

func (m *Manifest) RemoveLabel(name string) error

RemoveLabel will remove the label with the given name from the untarred ACI stored at a.CurrentImagePath

func (*Manifest) RemoveMount

func (m *Manifest) RemoveMount(mount string) error

RemoveMount will remove the mount point with the given name from the untarred ACI stored at a.CurrentImagePath

func (*Manifest) RemovePort

func (m *Manifest) RemovePort(port string) error

RemovePort will remove the port with the given name from the untarred ACI stored at a.CurrentImagePath.

func (*Manifest) Replace

func (m *Manifest) Replace(manifestPath string) error

Replace will replace the manifest in the expanded ACI stored at a.CurrentImagePath with the new manifest stored at manifestPath

func (*Manifest) SetExec

func (m *Manifest) SetExec(cmd []string) error

SetExec sets the exec command for the untarred ACI stored at a.CurrentImagePath.

func (*Manifest) SetGroup

func (m *Manifest) SetGroup(group string) error

SetGroup sets the group the pod will run as in the untarred ACI stored at a.CurrentImagePath.

func (*Manifest) SetName

func (m *Manifest) SetName(name string) error

SetName sets the name for the untarred ACI stored at a.CurrentImagePath

func (*Manifest) SetPostStop

func (m *Manifest) SetPostStop(exec []string) error

SetPostStop sets the post-stop event handler in the expanded ACI stored at a.CurrentImagePath

func (*Manifest) SetPreStart

func (m *Manifest) SetPreStart(exec []string) error

SetPreStart sets the pre-start event handler in the expanded ACI stored at a.CurrentImagePath

func (*Manifest) SetSuppGroups

func (m *Manifest) SetSuppGroups(groups []int) error

SetSuppGroups sets the groups the pod will run as in the untarred ACI stored at a.CurrentACIPath.

func (*Manifest) SetTag

func (m *Manifest) SetTag(value string) error

func (*Manifest) SetUser

func (m *Manifest) SetUser(user string) error

SetUser sets the user the pod will run as in the untarred ACI stored at a.CurrentImagePath.

func (*Manifest) SetWorkingDir

func (m *Manifest) SetWorkingDir(dir string) error

SetWorkingDir sets the workingDirectory value in the untarred ACI stored at a.CurrentImagePath

Jump to

Keyboard shortcuts

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