Documentation ¶
Overview ¶
Package remotecontext is a generated protocol buffer package.
It is generated from these files:
tarsum.proto
It has these top-level messages:
TarsumBackup
Index ¶
- Constants
- Variables
- func Detect(config backend.BuildConfig) (remote builder.Source, dockerfile *parser.Result, err error)
- func FromArchive(tarStream io.Reader) (builder.Source, error)
- func FullPath(remote builder.Source, path string) (string, error)
- func GetWithStatusError(address string) (resp *http.Response, err error)
- func MakeGitContext(gitURL string) (builder.Source, error)
- func NewFileHash(path, name string, fi os.FileInfo) (hash.Hash, error)
- func NewLazySource(root string) (builder.Source, error)
- func Rel(basepath string, targpath string) (string, error)
- func StatAt(remote builder.Source, path string) (os.FileInfo, error)
- type CachableSourcedeprecated
- func (cs *CachableSource) Close() error
- func (cs *CachableSource) HandleChange(kind fsutil.ChangeKind, p string, fi os.FileInfo, err error) (retErr error)
- func (cs *CachableSource) Hash(path string) (string, error)
- func (cs *CachableSource) MarshalBinary() ([]byte, error)
- func (cs *CachableSource) Root() string
- func (cs *CachableSource) Scan() error
- func (cs *CachableSource) UnmarshalBinary(data []byte) error
- type TarsumBackup
- 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
Constants ¶
const ClientSessionRemote = "client-session"
ClientSessionRemote is identifier for client-session context transport
Variables ¶
var ( ErrInvalidLengthTarsum = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTarsum = fmt.Errorf("proto: integer overflow") )
Functions ¶
func Detect ¶
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.
func FromArchive ¶
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.
func GetWithStatusError ¶
GetWithStatusError does an http.Get() and returns an error if the status code is 4xx or 5xx.
func MakeGitContext ¶
MakeGitContext returns a Context from gitURL that is cloned in a temporary directory.
func NewFileHash ¶
NewFileHash returns new hash that is used for the builder cache keys
func NewLazySource ¶
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.
Types ¶
type CachableSource
deprecated
type CachableSource struct {
// contains filtered or unexported fields
}
CachableSource is a source that contains cache records for its contents.
Deprecated: this type was used for the experimental "stream" support for the classic builder, which is no longer supported.
func NewCachableSource
deprecated
func NewCachableSource(root string) *CachableSource
NewCachableSource creates new CachableSource.
Deprecated: this type was used for the experimental "stream" support for the classic builder, which is no longer supported.
func (*CachableSource) HandleChange ¶
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 (*CachableSource) Hash ¶
func (cs *CachableSource) Hash(path string) (string, error)
Hash returns a hash for a single file in the source
func (*CachableSource) MarshalBinary ¶
func (cs *CachableSource) MarshalBinary() ([]byte, error)
MarshalBinary marshals current cache information to a byte array
func (*CachableSource) Root ¶
func (cs *CachableSource) Root() string
Root returns a root directory for the source
func (*CachableSource) Scan ¶
func (cs *CachableSource) Scan() error
Scan rescans the cache information from the file system
func (*CachableSource) UnmarshalBinary ¶
func (cs *CachableSource) UnmarshalBinary(data []byte) error
UnmarshalBinary decodes cache information for presented byte array
type TarsumBackup ¶
type TarsumBackup struct {
Hashes map[string]string `` /* 146-byte string literal not displayed */
}
func (*TarsumBackup) Descriptor ¶
func (*TarsumBackup) Descriptor() ([]byte, []int)
func (*TarsumBackup) Equal ¶
func (this *TarsumBackup) Equal(that interface{}) bool
func (*TarsumBackup) GetHashes ¶
func (m *TarsumBackup) GetHashes() map[string]string
func (*TarsumBackup) GoString ¶
func (this *TarsumBackup) GoString() string
func (*TarsumBackup) Marshal ¶
func (m *TarsumBackup) Marshal() (dAtA []byte, err error)
func (*TarsumBackup) ProtoMessage ¶
func (*TarsumBackup) ProtoMessage()
func (*TarsumBackup) Reset ¶
func (m *TarsumBackup) Reset()
func (*TarsumBackup) Size ¶
func (m *TarsumBackup) Size() (n int)
func (*TarsumBackup) String ¶
func (this *TarsumBackup) String() string
func (*TarsumBackup) Unmarshal ¶
func (m *TarsumBackup) Unmarshal(dAtA []byte) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package urlutil provides helper function to check if a given build-context location should be considered a URL or a remote Git repository.
|
Package urlutil provides helper function to check if a given build-context location should be considered a URL or a remote Git repository. |