Documentation ¶
Index ¶
- Variables
- func CatManifest(aciPath string, prettyPrint bool) (err error)
- type ACBuild
- func (a *ACBuild) AddAnnotation(name, value string) (err error)
- func (a *ACBuild) AddDependency(imageName types.ACIdentifier, imageId *types.Hash, labels types.Labels, ...) (err error)
- func (a *ACBuild) AddEnv(name, value string) (err error)
- func (a *ACBuild) AddIsolator(name string, value []byte) (err error)
- func (a *ACBuild) AddLabel(name, value string) (err error)
- func (a *ACBuild) AddMount(name, path string, readOnly bool) (err error)
- func (a *ACBuild) AddPort(name, protocol string, port, count uint, socketActivated bool) (err error)
- func (a *ACBuild) Begin(start string, insecure bool) (err error)
- func (a *ACBuild) CatManifest(prettyPrint bool) (err error)
- func (a *ACBuild) CopyToDir(froms []string, to string) (err error)
- func (a *ACBuild) CopyToTarget(from string, to string) (err error)
- func (a *ACBuild) End() error
- func (a *ACBuild) RemoveAnnotation(name string) (err error)
- func (a *ACBuild) RemoveDependency(imageName string) (err error)
- func (a *ACBuild) RemoveEnv(name string) (err error)
- func (a *ACBuild) RemoveIsolator(name string) (err error)
- func (a *ACBuild) RemoveLabel(name string) (err error)
- func (a *ACBuild) RemoveMount(name string) (err error)
- func (a *ACBuild) RemovePort(name string) (err error)
- func (a *ACBuild) ReplaceManifest(manifestPath string) (err error)
- func (a *ACBuild) Run(cmd []string, workingDir string, insecure bool, runEngine engine.Engine) (err error)
- func (a *ACBuild) SetExec(cmd []string) (err error)
- func (a *ACBuild) SetGroup(group string) (err error)
- func (a *ACBuild) SetName(name string) (err error)
- func (a *ACBuild) SetPostStop(exec []string) error
- func (a *ACBuild) SetPreStart(exec []string) error
- func (a *ACBuild) SetUser(user string) (err error)
- func (a *ACBuild) SetWorkingDir(dir string) (err error)
- func (a *ACBuild) Write(output string, overwrite, sign bool, gpgflags []string) (err error)
Constants ¶
This section is empty.
Variables ¶
var AppcVersion = schema.AppContainerVersion
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") )
var Version = "0.0.0+was-not-built-correctly"
Functions ¶
func CatManifest ¶ added in v0.2.0
CatManifest will print to stdout the manifest from the ACI stored at aciPath, optionally inserting whitespace to make it more human readable.
Types ¶
type ACBuild ¶
type ACBuild struct { ContextPath string LockPath string CurrentACIPath string DepStoreTarPath string DepStoreExpandedPath string OverlayTargetPath string OverlayWorkPath string Debug bool // contains filtered or unexported fields }
ACBuild contains all the information for a current build. Once an ACBuild has been created, the functions available on it will perform different actions in the build, like updating a dependency or writing a finished ACI.
func NewACBuild ¶
NewACBuild returns a new ACBuild struct with sane defaults for all of the different paths
func (*ACBuild) AddAnnotation ¶
AddAnnotation will add an annotation with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the annotation already exists its value will be updated to the new value.
func (*ACBuild) AddDependency ¶
func (a *ACBuild) AddDependency(imageName types.ACIdentifier, imageId *types.Hash, labels types.Labels, size uint) (err error)
AddDependency will add a dependency with the given name, id, labels, and size to the untarred ACI stored at a.CurrentACIPath. If the dependency already exists its fields will be updated to the new values.
func (*ACBuild) AddEnv ¶
AddEnv will add an environment variable with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the environment variable already exists its value will be updated to the new value.
func (*ACBuild) AddIsolator ¶ added in v0.2.0
func (*ACBuild) AddLabel ¶
AddLabel will add a label with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the label already exists its value will be updated to the new value.
func (*ACBuild) AddMount ¶
AddMount will add a mount point with the given name and path to the untarred ACI stored at a.CurrentACIPath. 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 (*ACBuild) AddPort ¶
func (a *ACBuild) AddPort(name, protocol string, port, count uint, socketActivated bool) (err error)
AddPort will add a port with the given name, protocol, port, and count to the untarred ACI stored at a.CurrentACIPath. 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 (*ACBuild) Begin ¶
Begin will start a new build, storing the untarred ACI the build operates on at a.CurrentACIPath. If start is the empty string, the build will begin with an empty ACI, otherwise the ACI stored at start will be used at the starting point.
func (*ACBuild) CatManifest ¶ added in v0.2.0
CatManifest will print to stdout the manifest from the expanded ACI stored at a.CurrentACIPath, optionally inserting whitespace to make it more human readable.
func (*ACBuild) CopyToDir ¶ added in v0.2.0
CopyToDir will copy all elements specified in the froms slice into the directory inside the current ACI specified by the to string.
func (*ACBuild) CopyToTarget ¶ added in v0.2.0
CopyToTarget will copy a single file/directory from the from string to the path specified by the to string inside the current ACI.
func (*ACBuild) End ¶
End will stop the current build. An error will be returned if no build is in progress.
func (*ACBuild) RemoveAnnotation ¶
RemoveAnnotation will remove the annotation with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemoveDependency ¶
RemoveDependency will remove the dependency with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) RemoveEnv ¶
RemoveEnv will remove the environment variable with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) RemoveIsolator ¶ added in v0.2.0
func (*ACBuild) RemoveLabel ¶
RemoveLabel will remove the label with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemoveMount ¶
RemoveMount will remove the mount point with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemovePort ¶
RemovePort will remove the port with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) ReplaceManifest ¶ added in v0.2.0
ReplaceManifest will replace the manifest in the expanded ACI stored at a.CurrentACIPath with the new manifest stored at manifestPath
func (*ACBuild) Run ¶
func (a *ACBuild) Run(cmd []string, workingDir string, insecure bool, runEngine engine.Engine) (err error)
Run will execute the given command in the ACI being built. a.CurrentACIPath is where the untarred ACI is stored, a.DepStoreTarPath is the directory to download dependencies into, a.DepStoreExpandedPath is where the dependencies are expanded into, and a.OverlayWorkPath is the work directory used by overlayfs.
Arguments:
- cmd: The command to run and its arguments.
- workingDir: If specified, the current directory inside the container is changed to its value before running the given command.
- runEngine: The engine used to perform the execution of the command.
func (*ACBuild) SetExec ¶
SetExec sets the exec command for the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) SetGroup ¶
SetGroup sets the group the pod will run as in the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) SetPostStop ¶ added in v0.2.0
SetPostStop sets the post-stop event handler in the expanded ACI stored at a.CurrentACIPath
func (*ACBuild) SetPreStart ¶ added in v0.2.0
SetPreStart sets the pre-start event handler in the expanded ACI stored at a.CurrentACIPath
func (*ACBuild) SetUser ¶
SetUser sets the user the pod will run as in the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) SetWorkingDir ¶ added in v0.2.0
SetWorkingDir sets the workingDirectory value in the untarred ACI stored at a.CurrentACIPath