Documentation
¶
Index ¶
- Constants
- type ContainerInfo
- type NetworkInfo
- type NetworkManager
- func (m *NetworkManager) Close() error
- func (m *NetworkManager) FindNetwork(ctx context.Context, name string) (*NetworkInfo, error)
- func (m *NetworkManager) InspectNetwork(ctx context.Context, networkID string) (*NetworkInfo, error)
- func (m *NetworkManager) ListNetworks(ctx context.Context) ([]NetworkInfo, error)
- type SidecarManager
Constants ¶
const ( // SidecarImage is the Docker image used for sidecar containers. SidecarImage = "btunnel-sidecar-agent:latest" // SidecarContainerPrefix is the naming prefix for sidecar containers. SidecarContainerPrefix = "btunnel-sidecar-" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInfo ¶
ContainerInfo represents a container connected to a network.
type NetworkInfo ¶
type NetworkInfo struct {
ID string
Name string
Driver string
Containers []ContainerInfo
}
NetworkInfo represents information about a Docker network.
type NetworkManager ¶
type NetworkManager struct {
// contains filtered or unexported fields
}
NetworkManager handles Docker network discovery and manipulation.
func NewNetworkManager ¶
func NewNetworkManager() (*NetworkManager, error)
NewNetworkManager creates a new Docker network manager.
func (*NetworkManager) Close ¶
func (m *NetworkManager) Close() error
Close closes the Docker client.
func (*NetworkManager) FindNetwork ¶
func (m *NetworkManager) FindNetwork(ctx context.Context, name string) (*NetworkInfo, error)
FindNetwork finds a Docker network by name.
func (*NetworkManager) InspectNetwork ¶
func (m *NetworkManager) InspectNetwork(ctx context.Context, networkID string) (*NetworkInfo, error)
InspectNetwork returns detailed information about a network.
func (*NetworkManager) ListNetworks ¶
func (m *NetworkManager) ListNetworks(ctx context.Context) ([]NetworkInfo, error)
ListNetworks returns all Docker networks.
type SidecarManager ¶
type SidecarManager struct {
// contains filtered or unexported fields
}
SidecarManager manages sidecar containers for Docker network isolation.
func NewSidecarManager ¶
func NewSidecarManager(networkName, targetAddress string) (*SidecarManager, error)
NewSidecarManager creates a new sidecar manager.
func (*SidecarManager) Close ¶
func (s *SidecarManager) Close(ctx context.Context) error
Close cleans up the sidecar manager.
func (*SidecarManager) GetContainerIP ¶
func (s *SidecarManager) GetContainerIP(ctx context.Context) (string, error)
GetContainerIP returns the IP address of the sidecar container within the target network.
func (*SidecarManager) GetSocketPath ¶
func (s *SidecarManager) GetSocketPath() string
GetSocketPath returns the path to the Unix domain socket on the host machine.