networks

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, cli *client.Client, network string, containerName string) error

Connect will connect a container to a network.

func Connected

func Connected(ctx context.Context, cli *client.Client, network string, containerName string) (bool, error)

Connected will check if a container is connected to a network.

func Create

func Create(ctx context.Context, cli *client.Client, network *networktypes.Inspect) error

Create is an abstraction layer on top of the Docker API call which will create a Docker network using a specified configuration.

func Get

func Get(ctx context.Context, cli *client.Client, name string) (networktypes.Inspect, error)

Get will use the Docker API to retrieve a Docker network which has a given name.

func Remove

func Remove(ctx context.Context, cli *client.Client, network string) error

Remove will attempt to remove a Docker network and will not apply force to removal.

func Status

func Status(ctx context.Context, cli *client.Client, network string) (bool, error)

Status will identify if a network with a specified name is present been created and return a boolean.

Types

This section is empty.

Jump to

Keyboard shortcuts

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