server: go.chromium.org/goma/server/remoteexec/datasource Index | Files

package datasource

import "go.chromium.org/goma/server/remoteexec/datasource"

Package datasource provides data source from local file, bytes etc.

Index

Package Files

datasource.go

func ReadAll Uses

func ReadAll(ctx context.Context, src Source) ([]byte, error)

ReadAll reads all data from source.

func ReadProto Uses

func ReadProto(ctx context.Context, src Source, m proto.Message) error

ReadProto reads data as proto message.

type Source Uses

type Source interface {
    Open(context.Context) (io.ReadCloser, error)
    String() string
}

Source accesses data source.

func Bytes Uses

func Bytes(name string, b []byte) Source

Bytes create new source for bytes.

func LocalFile Uses

func LocalFile(fullpath string) Source

LocalFile creates new source for the local file.

Package datasource imports 7 packages (graph) and is imported by 3 packages. Updated 2019-05-20. Refresh now. Tools for package owners.