Commit Graph

6 Commits

Author SHA1 Message Date
Cory Snider
4c6e571d38 api/pkg/stdcopy: move stdWriter to daemon/internal
Clients have no need for muxing streams using our StdCopy wire format.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-10-09 20:13:26 -04:00
Sebastiaan van Stijn
87033e1857 Merge pull request #50612 from thaJeztah/stdcopy_clean
apk/pkg/stdcopy: remove use of `iota`, improve docs, and add example
2025-08-04 19:44:22 +02:00
Sebastiaan van Stijn
26cf610e6e api/pkg/stdcopy: improve docs
- Outline the purpose of the Stdin and Systemerr streams and how
  they're used.
- Update docs for StdCopy function
- Touch-up error for unknown stream types

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-02 18:37:16 +02:00
Sebastiaan van Stijn
c010c84ade api/pkg/stdcopy: don't use iota for consts
iota can be convenient for internal use for cases where the value
doesn't matter. It can be a footgun when using it to define public
values; it's easy to accidentally change values (e.g. by re-ordering
or adding a value), which may go undetected within our code because
both producer and consumer would be updated.

This patch updates these consts to have a concrete value, because it's
part of the API contract and must not be changed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-02 17:23:51 +02:00
Sebastiaan van Stijn
908895b9c3 api: update "interface{}" to "any"
Keep the linters happier.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-02 01:27:06 +02:00
Derek McGowan
1da417980c Move api/stdcopy to api/pkg/stdcopy
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:30 +02:00