Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateImplicitRestart ¶
func UpdateImplicitRestart(containers []ContainerWithDeps, markedForRestart map[string]bool) []string
UpdateImplicitRestart marks containers that need restart because dependencies restart.
Types ¶
type ContainerSorter ¶
type ContainerSorter struct {
// contains filtered or unexported fields
}
ContainerSorter topologically sorts containers by dependency.
func NewContainerSorter ¶
func NewContainerSorter(containers []ContainerWithDeps) *ContainerSorter
NewContainerSorter creates a sorter for containers.
func (*ContainerSorter) Sort ¶
func (s *ContainerSorter) Sort() ([]ContainerWithDeps, error)
Sort returns containers in dependency order.
func (*ContainerSorter) SortReverse ¶
func (s *ContainerSorter) SortReverse() ([]ContainerWithDeps, error)
SortReverse returns containers in reverse dependency order.
type ContainerWithDeps ¶
type ContainerWithDeps struct {
Container container.Summary
Inspect container.InspectResponse
Name string
Links []string
DependsOn []string
NetworkDeps []string
}
ContainerWithDeps represents a container and its restart dependencies.
func ExtractContainerDeps ¶
func ExtractContainerDeps(ctx context.Context, dcli *client.Client, cnt container.Summary, inspect container.InspectResponse) ContainerWithDeps
ExtractContainerDeps extracts dependency information from a container inspect response.
Click to show internal directories.
Click to hide internal directories.