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>
This commit is contained in:
parent
545e79ae11
commit
bca5667362
@ -101,7 +101,7 @@ func createIO(ctx context.Context, id string, ioUID, ioGID int, stdio proc.Stdio
|
|||||||
pio.copy = true
|
pio.copy = true
|
||||||
pio.io, err = runc.NewPipeIO(ioUID, ioGID, withConditionalIO(stdio))
|
pio.io, err = runc.NewPipeIO(ioUID, ioGID, withConditionalIO(stdio))
|
||||||
case "binary":
|
case "binary":
|
||||||
pio.io, err = newBinaryIO(ctx, id, u)
|
pio.io, err = NewBinaryIO(ctx, id, u)
|
||||||
case "file":
|
case "file":
|
||||||
if err := os.MkdirAll(filepath.Dir(u.Host), 0755); err != nil {
|
if err := os.MkdirAll(filepath.Dir(u.Host), 0755); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -251,7 +251,8 @@ func isFifo(path string) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newBinaryIO(ctx context.Context, id string, uri *url.URL) (runc.IO, error) {
|
// NewBinaryIO runs a custom binary process for pluggable shim logging
|
||||||
|
func NewBinaryIO(ctx context.Context, id string, uri *url.URL) (runc.IO, error) {
|
||||||
ns, err := namespaces.NamespaceRequired(ctx)
|
ns, err := namespaces.NamespaceRequired(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user