dependencygraph

package
v0.0.0-...-c0defea Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CredentialsNotResolvedErr is the error where a container needs to wait for
	// credentials before it can process by agent
	CredentialsNotResolvedErr = errors.New("dependency graph: container execution credentials not available")
	// DependentContainerNotResolvedErr is the error where a dependent container isn't in expected state
	DependentContainerNotResolvedErr = errors.New("dependency graph: dependent container not in expected state")
	// ContainerPastDesiredStatusErr is the error where the container status is bigger than desired status
	ContainerPastDesiredStatusErr = errors.New("container transition: container status is equal or greater than desired status")
)

Functions

func DependenciesAreResolved

func DependenciesAreResolved(target *api.Container,
	by []*api.Container,
	id string,
	manager credentials.Manager) error

DependenciesAreResolved validates that the `target` container can be transitioned given the current known state of the containers in `by`. If this function returns true, `target` should be technically able to launch without issues. Transitions are between known statuses (whether the container can move to the next known status), not desired statuses; the desired status typically is either RUNNING or STOPPED.

func ValidDependencies

func ValidDependencies(task *api.Task) bool

ValidDependencies takes a task and verifies that it is possible to allow all containers within it to reach the desired status by proceeding in some order. ValidDependencies is called during DockerTaskEngine.AddTask to verify that a startup order can exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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