LogContainerEvent (daemon/events.go)

moby · daemon/events.go · go · Apache-2.0
infra, tag:knn-classified

Event logging helpers for Docker daemon, emitting container, network, and cluster events.

// Source: https://github.com/moby/moby | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package daemon

import (
	"context"
	"maps"
	"strconv"
	"strings"
	"time"

	"github.com/containerd/log"
	gogotypes "github.com/gogo/protobuf/types"
	"github.com/moby/moby/api/types/events"
	"github.com/moby/moby/v2/daemon/container"
	daemonevents "github.com/moby/moby/v2/daemon/events"
	"github.com/moby/moby/v2/daemon/internal/filters"
	"github.com/moby/moby/v2/daemon/libnetwork"
	swarmapi "github.com/moby/swarmkit/v2/api"
)

// LogContainerEvent generates an event related to a container with only the default attributes.
func (daemon *Daemon) LogContainerEvent(container *container.Container, ac

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key