Interface INetworkManager
- Namespace
- Bielu.Microservices.Orchestrator.Abstractions
- Assembly
- Bielu.Microservices.Orchestrator.dll
Manages container network operations.
public interface INetworkManager
Methods
ConnectAsync(string, string, NetworkAttachment, CancellationToken)
Connects a container to a network using a full NetworkAttachment description (aliases, static IP, gateway, MAC address, links, driver options, DNS names).
Task ConnectAsync(string networkId, string containerId, NetworkAttachment attachment, CancellationToken cancellationToken = default)
Parameters
networkIdstringcontainerIdstringattachmentNetworkAttachmentcancellationTokenCancellationToken
Returns
ConnectAsync(string, string, IEnumerable<string>?, CancellationToken)
Connects a container to a network.
Task ConnectAsync(string networkId, string containerId, IEnumerable<string>? aliases = null, CancellationToken cancellationToken = default)
Parameters
networkIdstringcontainerIdstringaliasesIEnumerable<string>cancellationTokenCancellationToken
Returns
CreateAsync(string, string, CancellationToken)
Creates a new network.
Task<string> CreateAsync(string name, string driver = "bridge", CancellationToken cancellationToken = default)
Parameters
namestringdriverstringcancellationTokenCancellationToken
Returns
DisconnectAsync(string, string, CancellationToken)
Disconnects a container from a network.
Task DisconnectAsync(string networkId, string containerId, CancellationToken cancellationToken = default)
Parameters
networkIdstringcontainerIdstringcancellationTokenCancellationToken
Returns
ListAsync(CancellationToken)
Lists all networks.
Task<IReadOnlyList<NetworkInfo>> ListAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
RemoveAsync(string, CancellationToken)
Removes a network.
Task RemoveAsync(string networkId, CancellationToken cancellationToken = default)
Parameters
networkIdstringcancellationTokenCancellationToken