package jsonstream

import "github.com/docker/cli/internal/jsonstream"

Index

Functions

func Display

func Display(ctx context.Context, in io.Reader, stream *streams.Out, opts ...Options) error

Display prints the JSON messages from the given reader to the given stream.

It wraps the jsonmessage.DisplayJSONMessagesStream function to make it "context aware" and appropriately returns why the function was canceled.

It returns an error if the context is canceled, but not if the input reader / stream is closed.

Types

type JSONError

type JSONError = jsonstream.Error

type JSONMessage

type JSONMessage = jsonstream.Message

type JSONProgress

type JSONProgress = jsonstream.Progress

type Options

type Options func(*options)

func WithAuxCallback

func WithAuxCallback(cb func(JSONMessage)) Options

Source Files

display.go

Version
v29.4.2+incompatible (latest)
Published
Apr 20, 2026
Platform
linux/amd64
Imports
5 packages
Last checked
7 hours ago

Tools for package owners.