import "github.com/docker/docker/builder/remotecontext"
Package remotecontext is a generated protocol buffer package.
It is generated from these files:
tarsum.proto
It has these top-level messages:
TarsumBackup
archive.go detect.go filehash.go generate.go git.go lazycontext.go mimetype.go remote.go tarsum.go tarsum.pb.go
const ClientSessionRemote = "client-session"
ClientSessionRemote is identifier for client-session context transport
var ( ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow") )
func Detect(config backend.BuildConfig) (remote builder.Source, dockerfile *parser.Result, err error)
Detect returns a context and dockerfile from remote location or local archive.
FromArchive returns a build source from a tar stream.
It extracts the tar stream to a temporary folder that is deleted as soon as the Context is closed. As the extraction happens, a tarsum is calculated for every file, and the set of all those sums then becomes the source of truth for all operations on this Context.
Closing tarStream has to be done by the caller.
FullPath is a helper for getting a full path for a path from a source
GetWithStatusError does an http.Get() and returns an error if the status code is 4xx or 5xx.
MakeGitContext returns a Context from gitURL that is cloned in a temporary directory.
NewFileHash returns new hash that is used for the builder cache keys
func NewLazySource(root containerfs.ContainerFS) (builder.Source, error)
NewLazySource creates a new LazyContext. LazyContext defines a hashed build context based on a root directory. Individual files are hashed first time they are asked. It is not safe to call methods of LazyContext concurrently.
func Rel(basepath containerfs.ContainerFS, targpath string) (string, error)
Rel makes a path relative to base path. Same as `filepath.Rel` but can also handle UUID paths in windows.
StatAt is a helper for calling Stat on a path from a source
type CachableSource struct {
// contains filtered or unexported fields
}
CachableSource is a source that contains cache records for its contents
func NewCachableSource(root string) *CachableSource
NewCachableSource creates new CachableSource
func (cs *CachableSource) Close() error
Close closes the source
func (cs *CachableSource) HandleChange(kind fsutil.ChangeKind, p string, fi os.FileInfo, err error) (retErr error)
HandleChange notifies the source about a modification operation
func (cs *CachableSource) Hash(path string) (string, error)
Hash returns a hash for a single file in the source
func (cs *CachableSource) MarshalBinary() ([]byte, error)
MarshalBinary marshals current cache information to a byte array
func (cs *CachableSource) Root() containerfs.ContainerFS
Root returns a root directory for the source
func (cs *CachableSource) Scan() error
Scan rescans the cache information from the file system
func (cs *CachableSource) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes cache information for presented byte array
type TarsumBackup struct { Hashes map[string]string `protobuf:"bytes,1,rep,name=Hashes" json:"Hashes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` }
func (*TarsumBackup) Descriptor() ([]byte, []int)
func (this *TarsumBackup) Equal(that interface{}) bool
func (m *TarsumBackup) GetHashes() map[string]string
func (this *TarsumBackup) GoString() string
func (m *TarsumBackup) Marshal() (dAtA []byte, err error)
func (m *TarsumBackup) MarshalTo(dAtA []byte) (int, error)
func (*TarsumBackup) ProtoMessage()
func (m *TarsumBackup) Reset()
func (m *TarsumBackup) Size() (n int)
func (this *TarsumBackup) String() string
func (m *TarsumBackup) Unmarshal(dAtA []byte) error
Path | Synopsis |
---|---|
git |
Package remotecontext imports 43 packages (graph) and is imported by 152 packages. Updated 2020-11-23. Refresh now. Tools for package owners.