Skip to content

Commit bca5667

Browse files
committed
Make newBinaryIO public
Allow third-party runtime implementations to reuse NewBinaryIO in order to support pluggable shim logging binary protocol. Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
1 parent 545e79a commit bca5667

File tree

1 file changed

+3
-2
lines changed
  • runtime/v1/linux/proc

1 file changed

+3
-2
lines changed

runtime/v1/linux/proc/io.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func createIO(ctx context.Context, id string, ioUID, ioGID int, stdio proc.Stdio
101101
pio.copy = true
102102
pio.io, err = runc.NewPipeIO(ioUID, ioGID, withConditionalIO(stdio))
103103
case "binary":
104-
pio.io, err = newBinaryIO(ctx, id, u)
104+
pio.io, err = NewBinaryIO(ctx, id, u)
105105
case "file":
106106
if err := os.MkdirAll(filepath.Dir(u.Host), 0755); err != nil {
107107
return nil, err
@@ -251,7 +251,8 @@ func isFifo(path string) (bool, error) {
251251
return false, nil
252252
}
253253

254-
func newBinaryIO(ctx context.Context, id string, uri *url.URL) (runc.IO, error) {
254+
// NewBinaryIO runs a custom binary process for pluggable shim logging
255+
func NewBinaryIO(ctx context.Context, id string, uri *url.URL) (runc.IO, error) {
255256
ns, err := namespaces.NamespaceRequired(ctx)
256257
if err != nil {
257258
return nil, err

0 commit comments

Comments
 (0)