MCPcopy
hub / github.com/moby/moby / Copier

Struct Copier

daemon/logger/copier.go:27–34  ·  view source on GitHub ↗

Copier can copy logs from specified sources to Logger and attach Timestamp. Writes are concurrent, so you need implement some sync in your logger.

Source from the content-addressed store, hash-verified

25// Copier can copy logs from specified sources to Logger and attach Timestamp.
26// Writes are concurrent, so you need implement some sync in your logger.
27type Copier struct {
28 // srcs is map of name -> reader pairs, for example "stdout", "stderr"
29 srcs map[string]io.Reader
30 dst Logger
31 copyJobs sync.WaitGroup
32 closeOnce sync.Once
33 closed chan struct{}
34}
35
36// NewCopier creates a new Copier
37func NewCopier(srcs map[string]io.Reader, dst Logger) *Copier {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected