container

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package container tracks the current containers from the docker runtime.

Index

Constants

View Source
const Name = "docker-container"

Name is the ID of the Docker container component.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, ignoreConnectionErrors bool) components.Component

Types

type Data added in v0.4.5

type Data struct {
	// DockerServiceActive is true if the docker service is active.
	DockerServiceActive bool `json:"docker_service_active"`

	// Containers is the list of containers.
	Containers []DockerContainer `json:"containers,omitempty"`
	// contains filtered or unexported fields
}

type DockerContainer

type DockerContainer struct {
	ID           string `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Image        string `json:"image,omitempty"`
	CreatedAt    int64  `json:"created_at,omitempty"`
	State        string `json:"state,omitempty"`
	PodName      string `json:"pod_name,omitempty"`
	PodNamespace string `json:"pod_namespace,omitempty"`
}

func (DockerContainer) JSON

func (s DockerContainer) JSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL