deps

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

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