Documentation
¶
Index ¶
- func NumberOfRunningProcesses(match lbdeploy.ProcessMatch) (n int, err error)
- type AppEngine
- func (engine AppEngine) EvaluateAppChanges(installs, uninstalls lbdeploy.AppList) (changes lbdeploy.AppEvaluation, err error)
- func (engine AppEngine) InstalledApps(list lbdeploy.AppList) (installed lbdeploy.AppList, err error)
- func (engine AppEngine) IsInstalled(app lbdeploy.AppID) (bool, error)
- func (engine AppEngine) MissingApps(list lbdeploy.AppList) (missing lbdeploy.AppList, err error)
- func (engine AppEngine) SummarizeAppChanges(evaluation lbdeploy.AppEvaluation) (changes lbdeploy.AppSummary, err error)
- func (engine AppEngine) Version(app lbdeploy.AppID) (datatype.Version, error)
- type ConditionEngine
- type DeploymentEngine
- type FileVerifier
- type Lock
- type LockError
- type LockGroup
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NumberOfRunningProcesses ¶
func NumberOfRunningProcesses(match lbdeploy.ProcessMatch) (n int, err error)
NumberOfRunningProcesses returns the number of processes running on the local system that match the given criteria.
Types ¶
type AppEngine ¶
type AppEngine struct {
// contains filtered or unexported fields
}
AppEngine is responsible for evaluating the status of applications on the local system.
func NewAppEngine ¶
func NewAppEngine(dep lbdeploy.Deployment) AppEngine
NewAppEngine prepares an app engine for the given deployment.
func (AppEngine) EvaluateAppChanges ¶
func (engine AppEngine) EvaluateAppChanges(installs, uninstalls lbdeploy.AppList) (changes lbdeploy.AppEvaluation, err error)
EvaluateAppChanges evaluates the changes needed to effect the given set of application installs and uninstalls.
func (AppEngine) InstalledApps ¶
func (engine AppEngine) InstalledApps(list lbdeploy.AppList) (installed lbdeploy.AppList, err error)
InstalledApps returns any of the apps in the list that are installed on the local system.
func (AppEngine) IsInstalled ¶
IsInstalled returns true if the application is installed on the local system.
If it is unable to make a determination, it returns an error.
func (AppEngine) MissingApps ¶
MissingApps returns any of the apps in the list that are not installed on the local system.
func (AppEngine) SummarizeAppChanges ¶
func (engine AppEngine) SummarizeAppChanges(evaluation lbdeploy.AppEvaluation) (changes lbdeploy.AppSummary, err error)
SummarizeAppChanges summarizes the effectiveness of application installs and uninstalls anticipated by a previous evaluation.
type ConditionEngine ¶
type ConditionEngine struct {
// contains filtered or unexported fields
}
ConditionEngine is responsible for evaluating conditions on the local system.
func NewConditionEngine ¶
func NewConditionEngine(dep lbdeploy.Deployment) ConditionEngine
NewConditionEngine prepares a condition engine for the given deployment.
func (ConditionEngine) Evaluate ¶
func (engine ConditionEngine) Evaluate(condition lbdeploy.ConditionID) (bool, error)
Evaluate returns true if the given condition is currently true.
TODO: Consider returning some sort of evaluation struct that describes the condition (or subconditions) that failed.
type DeploymentEngine ¶
type DeploymentEngine struct {
// contains filtered or unexported fields
}
DeploymentEngine is a LeafBridge engine that is responsible for invocation of deployments.
func NewDeploymentEngine ¶
func NewDeploymentEngine(deployment lbdeploy.Deployment, opts Options) DeploymentEngine
NewDeploymentEngine returns a new LeafBridge deployment engine for the given deployment and options.
type FileVerifier ¶
type FileVerifier struct {
// contains filtered or unexported fields
}
FileVerifier is capable of absorbing file content as a file is read or downloaded. When finished, it can produce a set of attributes for the file, including its cryptographic hash sums.
func NewFileVerifier ¶
func NewFileVerifier(hashTypes ...filehash.Type) (*FileVerifier, error)
NewFileVerifier returns a file verifier that will generate the provided file hash types.
It returns an error if any of the file hash types are not recognized.
func (*FileVerifier) HashTypes ¶
func (v *FileVerifier) HashTypes() []filehash.Type
HashTypes returns an ordered list of hash types that the verifier is producing.
func (*FileVerifier) ReadFrom ¶
func (v *FileVerifier) ReadFrom(r io.Reader) (n int64, err error)
ReadFrom reads data from r until it encounters io.EOF or an error.
It returns the total number of bytes read.
func (*FileVerifier) Reset ¶
func (v *FileVerifier) Reset()
Reset resets the verifier to its initial state.
func (*FileVerifier) Size ¶
func (v *FileVerifier) Size() int64
Size returns the number of bytes that have been written to the verifier so far.
func (*FileVerifier) State ¶
func (v *FileVerifier) State() lbdeploy.FileAttributes
State returns the current attributes of the file being verified.
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock is a lockable resource.
type LockGroup ¶
type LockGroup struct {
// contains filtered or unexported fields
}
LockGroup facilitates locking and unlocking a group of lockable resources together.