jsonstream

package
v0.0.0-...-9c0042a Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

Error wraps a concrete Code and Message, Code is an integer error code, Message is the error message.

func (*Error) Error

func (e *Error) Error() string

type Message

type Message struct {
	Stream   string           `json:"stream,omitempty"`
	Status   string           `json:"status,omitempty"`
	Progress *Progress        `json:"progressDetail,omitempty"`
	ID       string           `json:"id,omitempty"`
	Error    *Error           `json:"errorDetail,omitempty"`
	Aux      *json.RawMessage `json:"aux,omitempty"` // Aux contains out-of-band data, such as digests for push signing and image id after building.
}

JSONMessage defines a message struct. It describes the created time, where it from, status, ID of the message. It's used for docker events.

type Progress

type Progress struct {
	Current    int64  `json:"current,omitempty"`    // Current is the current status and value of the progress made towards Total.
	Total      int64  `json:"total,omitempty"`      // Total is the end value describing when we made 100% progress for an operation.
	Start      int64  `json:"start,omitempty"`      // Start is the initial value for the operation.
	HideCounts bool   `json:"hidecounts,omitempty"` // HideCounts. if true, hides the progress count indicator (xB/yB).
	Units      string `json:"units,omitempty"`      // Units is the unit to print for progress. It defaults to "bytes" if empty.
}

Progress describes a progress message in a JSON stream.

Jump to

Keyboard shortcuts

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