class Docr::Endpoints::Networks

Overview

The Networks class provides methods to interact with network-related endpoints. This class uses the client to send requests to the server and handles the responses.

Defined in:

docr/endpoints/networks.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Docr::Client) #

Initializes a new Networks instance with the provided client.


[View source]

Instance Method Detail

def client : Docr::Client #

A client instance used for making requests.


[View source]
def connect #

Connects a given container to a network. (Implementation is currently pending.)


[View source]
def create(config : Docr::Types::NetworkConfig) #

Creates a new network using the given configuration.

  • config: Configuration for creating the network.

Returns the created network.


[View source]
def delete(id : String) #

Deletes a specific network using its ID.

  • id: ID of the network to delete.

Deletes the network.


[View source]
def disconnect #

Disconnects a given container from a network. (Implementation is currently pending.)


[View source]
def inspect(id : String, verbose : Bool = false, scope : String = "local") : Docr::Types::Network #

Inspects a specific network using its ID. Additional optional parameters can be used to adjust the verbosity and scope of the inspection.

  • id: ID of the network to inspect.
  • verbose: If true, provides detailed information. Default is false.
  • scope: Specifies the scope of the inspection. Default is "local".

Returns details about the network.


[View source]
def list : Array(Docr::Types::Network) #

Retrieves a list of all networks.

Returns an array of network objects.


[View source]