Documentation ¶
Index ¶
Constants ¶
const ( // Service ID of the container management gRPC service ContainersServiceID = "container-management.grpc.v1.service-containers" // Service ID of the system information gRPC service SystemInfoServiceID = "container-management.grpc.v1.service-systemInfo" )
Service IDs used to enable configurability and discovery between the different services using the internal daemon's registry
const (
// MaxBufSize is the maximum buffer size (in bytes) received in a read chunk or sent in a write chunk.
MaxBufSize = 2 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads from a byte stream.
func NewReader ¶
func NewReader(ctx context.Context, containerID string, stdIn bool, readServer pbcontainers.Containers_AttachServer) (*Reader, error)
NewReader creates a new Reader to read a resource.
func NewReaderAt ¶
func NewReaderAt(ctx context.Context, containerID string, stdIn bool, readServer pbcontainers.Containers_AttachServer, offset int64) (*Reader, error)
NewReaderAt creates a new Reader to read a resource from the given offset.
func (*Reader) ContainerID ¶
ContainerID gets the container id of the IO this Reader is reading.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes to a byte stream.
func NewWriter ¶
func NewWriter(ctx context.Context, containerID string, stdIn bool, writeServer pbcontainers.Containers_AttachServer) (*Writer, error)
NewWriter creates a new Writer to write a resource.
resourceName specifies the name of the resource. The resource will be available after Close has been called.
It is the caller's responsibility to call Close when writing is done.
TODO: There is currently no way to resume a write. Maybe NewWriter should begin with a call to QueryWriteStatus.
func (*Writer) Close ¶
Close implements io.Closer. It is the caller's responsibility to call Close() when writing is done.
func (*Writer) ContainerID ¶
ContainerID gets the container ID of the IO this Writer is writing.