Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageStreamer ¶
type MessageStreamer interface {
io.ReadCloser
JSONMessages(ctx context.Context) iter.Seq2[jsonstream.Message, error]
Wait(ctx context.Context) error
}
MessageStreamer abstracts Moby's API client client.ImagePullResponse and client.ImagePushResponse. Unfortunately, moby's client implementation is internal, so we have to somehow mock it here in order to use it our mock tests.
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
Streamer implements MessageStreamer.
func New ¶
func New(rc io.ReadCloser) *Streamer
New returns a new JSON message streamer; it panics when given a nil io.ReadCloser.
func (Streamer) Close ¶
Close the message streamer, returning any error. Close is idempotent, closing the io.ReaderCloser only once and returning any error on this first close on any later calls.
func (Streamer) JSONMessages ¶
JSONMessages iterates over all messages from a stream.
Click to show internal directories.
Click to hide internal directories.