mobynet

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package mobynet implements the discovery of Docker network names and container/service labels on these networks, using the Docker API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverAttachedNames

func DiscoverAttachedNames(ctx context.Context, moby *client.Client, centerID string) ([]dig.DockerNetwork, string, error)

DiscoverAttachedNames takes on the position of the “origin” or “center” container identified by centerID and then inspects the networks attached to this container 0. It then queries the containers attached to the attached networks for their container names and aliases.

This implementation even works correctly in situations with multiple Docker networks having the same name, yet different IDs. Docker networks are different from containers in that network names are not necessarily unambiguous, while container names always are.

Types

This section is empty.

Jump to

Keyboard shortcuts

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