mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 06:10:23 -04:00
21 lines
502 B
Go
21 lines
502 B
Go
// +build linux freebsd
|
|
|
|
package logger // import "github.com/docker/docker/daemon/logger"
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/containerd/fifo"
|
|
"github.com/pkg/errors"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func openPluginStream(a *pluginAdapter) (io.WriteCloser, error) {
|
|
f, err := fifo.OpenFifo(context.Background(), a.fifoPath, unix.O_WRONLY|unix.O_CREAT|unix.O_NONBLOCK, 0700)
|
|
if err != nil {
|
|
return nil, errors.Wrapf(err, "error creating i/o pipe for log plugin: %s", a.Name())
|
|
}
|
|
return f, nil
|
|
}
|