class Docr::Endpoints::Networks
- Docr::Endpoints::Networks
- Reference
- Object
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.crConstructors
-
.new(client : Docr::Client)
Initializes a new
Networks
instance with the provided client.
Instance Method Summary
-
#client : Docr::Client
A client instance used for making requests.
-
#connect
Connects a given container to a network.
-
#create(config : Docr::Types::NetworkConfig)
Creates a new network using the given configuration.
-
#delete(id : String)
Deletes a specific network using its ID.
-
#disconnect
Disconnects a given container from a network.
-
#inspect(id : String, verbose : Bool = false, scope : String = "local") : Docr::Types::Network
Inspects a specific network using its ID.
-
#list : Array(Docr::Types::Network)
Retrieves a list of all networks.
Constructor Detail
Instance Method Detail
Creates a new network using the given configuration.
- config: Configuration for creating the network.
Returns the created network.
Deletes a specific network using its ID.
- id: ID of the network to delete.
Deletes the network.
Disconnects a given container from a network. (Implementation is currently pending.)
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.
Retrieves a list of all networks.
Returns an array of network objects.