MCPcopy Index your code
hub / github.com/docker/docker-agent / Drain

Method Drain

pkg/runtime/message_queue.go:35–35  ·  view source on GitHub ↗

Drain returns all pending messages and removes them from the queue. Must not block — if the queue is empty it returns nil.

(ctx context.Context)

Source from the content-addressed store, hash-verified

33 // Drain returns all pending messages and removes them from the queue.
34 // Must not block — if the queue is empty it returns nil.
35 Drain(ctx context.Context) []QueuedMessage
36}
37
38// inMemoryMessageQueue is the default MessageQueue backed by a buffered channel.

Callers 2

readNotificationsMethod · 0.65
drainAndEmitSteeredMethod · 0.65

Implementers 1

inMemoryMessageQueuepkg/runtime/message_queue.go

Calls

no outgoing calls

Tested by

no test coverage detected