Skip to content

client/pkg/jsonmessage: refactor in terms of api/types/jsonstream#51156

Merged
vvoland merged 1 commit intomoby:masterfrom
corhere:client-pkg-jsonmessage
Oct 30, 2025
Merged

client/pkg/jsonmessage: refactor in terms of api/types/jsonstream#51156
vvoland merged 1 commit intomoby:masterfrom
corhere:client-pkg-jsonmessage

Conversation

@corhere
Copy link
Contributor

@corhere corhere commented Oct 9, 2025

- What I did
Refactored client/pkg/jsonmessage to reference the API types, eliminating its separate definition.

- How I did it
By changing some methods and struct fields to functions and function arguments.

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@corhere
Copy link
Contributor Author

corhere commented Oct 10, 2025

cc @ndeloof

@corhere corhere modified the milestones: 30.0.0, 29.0.0 Oct 10, 2025
Comment on lines +4 to +8

// 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 Message struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to look at this, because I think events is the only stream ... not actually using this; we have an events.Message type now, which .. .does have some fields that overlap;

// Message represents the information an event contains
type Message struct {
Type Type
Action Action
Actor Actor
// Engine events are local scope. Cluster events are swarm scope.
Scope string `json:"scope,omitempty"`
Time int64 `json:"time,omitempty"`
TimeNano int64 `json:"timeNano,omitempty"`
}

I think this may have been when things changed; d6bd79c

@thompson-shaun thompson-shaun added the release-blocker PRs we want to block a release on label Oct 16, 2025
Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the client-pkg-jsonmessage branch from 131a8da to bbaeb90 Compare October 28, 2025 21:11
@corhere corhere marked this pull request as ready for review October 28, 2025 21:11
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vvoland PTAL

@vvoland vvoland merged commit 5a871b8 into moby:master Oct 30, 2025
216 of 218 checks passed
@corhere corhere deleted the client-pkg-jsonmessage branch October 30, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api API area/dependencies area/go-sdk kind/refactor PR's that refactor, or clean-up code module/api module/client release-blocker PRs we want to block a release on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants