Documentation
¶
Index ¶
- func DetectNetwork(ctx context.Context, runner exec.Runner, network string) (string, error)
- func EnsureImage(ctx context.Context, runner exec.Runner, image string) error
- func StartCapture(ctx context.Context, runner exec.Runner, image, network string, args ...string) (io.ReadCloser, func() error, error)
- func StopCapture(ctx context.Context, runner exec.Runner)
- type ServiceMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectNetwork ¶
DetectNetwork validates the given network name, or auto-detects a custom Docker network if none is specified.
func EnsureImage ¶
EnsureImage checks if the image exists locally and pulls it if not.
func StartCapture ¶
func StartCapture( ctx context.Context, runner exec.Runner, image, network string, args ...string, ) (io.ReadCloser, func() error, error)
StartCapture starts the trcd container with host networking and returns a reader for its stdout (NDJSON stream). The trcd process captures traffic on the bridge interface (br-<id>) corresponding to the Docker network. The caller must call the returned cleanup function when done.
Types ¶
type ServiceMap ¶
ServiceMap maps container IP addresses to human-readable service names.
func ResolveServices ¶
ResolveServices queries the Docker network and builds a map from container IP to a cleaned-up service name.
Click to show internal directories.
Click to hide internal directories.