Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSocket ¶
CheckSocket checks if Docker socket is available
Types ¶
type Container ¶
type Container struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
State string `json:"state"`
Status string `json:"status"`
Ports []Port `json:"ports"`
Labels map[string]string `json:"labels"`
Created int64 `json:"created"`
Networks map[string]Network `json:"networks"`
Hostname string `json:"hostname"` // added to use hostname if available instead of network address
}
Container represents a Docker container
type EventCallback ¶
type EventCallback func(containers []Container)
EventCallback defines the function signature for handling Docker events
type EventMonitor ¶
type EventMonitor struct {
// contains filtered or unexported fields
}
EventMonitor handles Docker event monitoring
func NewEventMonitor ¶
func NewEventMonitor(socketPath string, enforceNetworkValidation bool, callback EventCallback) (*EventMonitor, error)
NewEventMonitor creates a new Docker event monitor
func (*EventMonitor) Start ¶
func (em *EventMonitor) Start() error
Start begins monitoring Docker events
type Network ¶
type Network struct {
NetworkID string `json:"networkId"`
EndpointID string `json:"endpointId"`
Gateway string `json:"gateway,omitempty"`
IPAddress string `json:"ipAddress,omitempty"`
IPPrefixLen int `json:"ipPrefixLen,omitempty"`
IPv6Gateway string `json:"ipv6Gateway,omitempty"`
GlobalIPv6Address string `json:"globalIPv6Address,omitempty"`
GlobalIPv6PrefixLen int `json:"globalIPv6PrefixLen,omitempty"`
MacAddress string `json:"macAddress,omitempty"`
Aliases []string `json:"aliases,omitempty"`
DNSNames []string `json:"dnsNames,omitempty"`
}
Network represents network information for a Docker container
Click to show internal directories.
Click to hide internal directories.