Documentation
¶
Index ¶
- type EncryptionConfig
- type Manager
- func (m *Manager) ConnectContainer(containerName string, aliases []string) error
- func (m *Manager) ConnectToExternalNetwork(containerName, targetProject string, targetEnvironment string) error
- func (m *Manager) DisconnectContainer(containerName string) error
- func (m *Manager) EnsureContainerConnectedToAllNetworks(containerName string) error
- func (m *Manager) EnsureNetwork() error
- func (m *Manager) GetAllProjectNetworks() ([]string, error)
- func (m *Manager) GetContainerIP(containerName string) (string, error)
- func (m *Manager) GetContainerNetworks(containerName string) ([]string, error)
- func (m *Manager) GetNetworkInfo() (string, error)
- func (m *Manager) GetNetworkName() string
- func (m *Manager) ListConnectedContainers() ([]string, error)
- func (m *Manager) RemoveNetwork() error
- type NetworkEncryption
- func (n *NetworkEncryption) CreateEncryptedNetwork(networkName string, subnet string) error
- func (n *NetworkEncryption) EnableEncryption(networkName string) error
- func (n *NetworkEncryption) EnableSwarmAutolock() (string, error)
- func (n *NetworkEncryption) EnsureProjectNetworkEncrypted(projectName, environment string) error
- func (n *NetworkEncryption) GetNetworkStatus() (map[string]bool, error)
- func (n *NetworkEncryption) GetSwarmUnlockKey() (string, error)
- func (n *NetworkEncryption) IsNetworkEncrypted(networkName string) (bool, error)
- func (n *NetworkEncryption) RecreateNetworkWithEncryption(networkName string) error
- func (n *NetworkEncryption) RotateSwarmUnlockKey() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncryptionConfig ¶ added in v0.0.3
type EncryptionConfig struct {
Enabled bool `yaml:"enabled"`
IPSecMode string `yaml:"ipsecMode,omitempty"` // "default", "strict"
DataPath string `yaml:"dataPath,omitempty"` // "encrypted", "unencrypted"
}
EncryptionConfig defines network encryption settings
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles Docker network operations
func NewManager ¶
NewManager creates a new network manager
func (*Manager) ConnectContainer ¶
ConnectContainer connects a container to the project network
func (*Manager) ConnectToExternalNetwork ¶
func (m *Manager) ConnectToExternalNetwork(containerName, targetProject string, targetEnvironment string) error
ConnectToExternalNetwork connects a container to another project's network This enables cross-project service communication via Docker DNS targetEnvironment: environment of the target project (defaults to current environment if empty)
func (*Manager) DisconnectContainer ¶
DisconnectContainer disconnects a container from the project network
func (*Manager) EnsureContainerConnectedToAllNetworks ¶
EnsureContainerConnectedToAllNetworks ensures a container (like Traefik) is connected to all project networks
func (*Manager) EnsureNetwork ¶
EnsureNetwork creates the Docker network if it doesn't exist
func (*Manager) GetAllProjectNetworks ¶
GetAllProjectNetworks returns a list of all Tako project networks
func (*Manager) GetContainerIP ¶
GetContainerIP returns the IP address of a container in the network
func (*Manager) GetContainerNetworks ¶
GetContainerNetworks returns a list of networks a container is connected to
func (*Manager) GetNetworkInfo ¶
GetNetworkInfo returns information about the network
func (*Manager) GetNetworkName ¶
GetNetworkName returns the Docker network name for the project and environment
func (*Manager) ListConnectedContainers ¶
ListConnectedContainers lists all containers connected to the network
func (*Manager) RemoveNetwork ¶
RemoveNetwork removes the Docker network
type NetworkEncryption ¶ added in v0.0.3
type NetworkEncryption struct {
// contains filtered or unexported fields
}
NetworkEncryption manages Docker Swarm network encryption
func NewNetworkEncryption ¶ added in v0.0.3
func NewNetworkEncryption(client *ssh.Client, verbose bool) *NetworkEncryption
NewNetworkEncryption creates a new network encryption manager
func (*NetworkEncryption) CreateEncryptedNetwork ¶ added in v0.0.3
func (n *NetworkEncryption) CreateEncryptedNetwork(networkName string, subnet string) error
CreateEncryptedNetwork creates a new encrypted overlay network
func (*NetworkEncryption) EnableEncryption ¶ added in v0.0.3
func (n *NetworkEncryption) EnableEncryption(networkName string) error
EnableEncryption enables encryption on a Docker overlay network Docker Swarm uses IPsec encryption for overlay networks when --opt encrypted is set
func (*NetworkEncryption) EnableSwarmAutolock ¶ added in v0.0.3
func (n *NetworkEncryption) EnableSwarmAutolock() (string, error)
EnableSwarmAutolock enables Swarm autolock for manager node encryption
func (*NetworkEncryption) EnsureProjectNetworkEncrypted ¶ added in v0.0.3
func (n *NetworkEncryption) EnsureProjectNetworkEncrypted(projectName, environment string) error
EnsureProjectNetworkEncrypted ensures the project network is encrypted
func (*NetworkEncryption) GetNetworkStatus ¶ added in v0.0.3
func (n *NetworkEncryption) GetNetworkStatus() (map[string]bool, error)
GetNetworkStatus returns the encryption status of all overlay networks
func (*NetworkEncryption) GetSwarmUnlockKey ¶ added in v0.0.3
func (n *NetworkEncryption) GetSwarmUnlockKey() (string, error)
GetSwarmUnlockKey retrieves the current Swarm unlock key
func (*NetworkEncryption) IsNetworkEncrypted ¶ added in v0.0.3
func (n *NetworkEncryption) IsNetworkEncrypted(networkName string) (bool, error)
IsNetworkEncrypted checks if a network has encryption enabled
func (*NetworkEncryption) RecreateNetworkWithEncryption ¶ added in v0.0.3
func (n *NetworkEncryption) RecreateNetworkWithEncryption(networkName string) error
RecreateNetworkWithEncryption recreates a network with encryption enabled WARNING: This will disconnect all services from the network
func (*NetworkEncryption) RotateSwarmUnlockKey ¶ added in v0.0.3
func (n *NetworkEncryption) RotateSwarmUnlockKey() (string, error)
RotateSwarmUnlockKey rotates the Swarm unlock key