bytestream

package
v0.0.243 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(ctx context.Context, bs ByteStream) (schema.Digest, error)

func ReadAll

func ReadAll(contents ByteStream) ([]byte, error)

func WriteTo

func WriteTo(w io.Writer, contents ByteStream) error

Types

type ByteStream

type ByteStream interface {
	ContentLength() uint64
	Reader() (io.ReadCloser, error)
}

type ByteStreamWithDigest

type ByteStreamWithDigest interface {
	ByteStream
	ComputeDigest(context.Context) (schema.Digest, error)
}

type ReaderAtCloser

type ReaderAtCloser interface {
	io.ReaderAt
	io.Closer
}

func ReaderAt

func ReaderAt(bs ByteStream) (ReaderAtCloser, error)

type Static

type Static struct {
	Contents []byte
}

func (Static) ContentLength

func (s Static) ContentLength() uint64

func (Static) Reader

func (s Static) Reader() (io.ReadCloser, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL