Documentation
¶
Index ¶
- Constants
- Variables
- func Checksum(ctx context.Context, ref cache.ImmutableRef, path string, opts ChecksumOpts, ...) (digest.Digest, error)
- func ClearCacheContext(md cache.RefMetadata)
- func NewFileHash(path string, fi os.FileInfo) (hash.Hash, error)
- func NewFromStat(stat *fstypes.Stat) (hash.Hash, error)
- func SetCacheContext(ctx context.Context, md cache.RefMetadata, cc CacheContext) error
- func WriteV1TarsumHeaders(h *tar.Header, w io.Writer)
- type CacheContext
- type CacheRecord
- func (m *CacheRecord) CloneMessageVT() proto.Message
- func (m *CacheRecord) CloneVT() *CacheRecord
- func (*CacheRecord) Descriptor() ([]byte, []int)deprecated
- func (this *CacheRecord) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CacheRecord) EqualVT(that *CacheRecord) bool
- func (x *CacheRecord) GetDigest() string
- func (x *CacheRecord) GetLinkname() string
- func (x *CacheRecord) GetType() CacheRecordType
- func (m *CacheRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CacheRecord) MarshalToVT(dAtA []byte) (int, error)
- func (m *CacheRecord) MarshalVT() (dAtA []byte, err error)
- func (*CacheRecord) ProtoMessage()
- func (x *CacheRecord) ProtoReflect() protoreflect.Message
- func (x *CacheRecord) Reset()
- func (m *CacheRecord) SizeVT() (n int)
- func (x *CacheRecord) String() string
- func (m *CacheRecord) UnmarshalVT(dAtA []byte) error
- type CacheRecordType
- func (CacheRecordType) Descriptor() protoreflect.EnumDescriptor
- func (x CacheRecordType) Enum() *CacheRecordType
- func (CacheRecordType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CacheRecordType) Number() protoreflect.EnumNumber
- func (x CacheRecordType) String() string
- func (CacheRecordType) Type() protoreflect.EnumType
- type CacheRecordWithPath
- func (m *CacheRecordWithPath) CloneMessageVT() proto.Message
- func (m *CacheRecordWithPath) CloneVT() *CacheRecordWithPath
- func (*CacheRecordWithPath) Descriptor() ([]byte, []int)deprecated
- func (this *CacheRecordWithPath) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CacheRecordWithPath) EqualVT(that *CacheRecordWithPath) bool
- func (x *CacheRecordWithPath) GetPath() string
- func (x *CacheRecordWithPath) GetRecord() *CacheRecord
- func (m *CacheRecordWithPath) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CacheRecordWithPath) MarshalToVT(dAtA []byte) (int, error)
- func (m *CacheRecordWithPath) MarshalVT() (dAtA []byte, err error)
- func (*CacheRecordWithPath) ProtoMessage()
- func (x *CacheRecordWithPath) ProtoReflect() protoreflect.Message
- func (x *CacheRecordWithPath) Reset()
- func (m *CacheRecordWithPath) SizeVT() (n int)
- func (x *CacheRecordWithPath) String() string
- func (m *CacheRecordWithPath) UnmarshalVT(dAtA []byte) error
- type CacheRecords
- func (m *CacheRecords) CloneMessageVT() proto.Message
- func (m *CacheRecords) CloneVT() *CacheRecords
- func (*CacheRecords) Descriptor() ([]byte, []int)deprecated
- func (this *CacheRecords) EqualMessageVT(thatMsg proto.Message) bool
- func (this *CacheRecords) EqualVT(that *CacheRecords) bool
- func (x *CacheRecords) GetPaths() []*CacheRecordWithPath
- func (m *CacheRecords) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *CacheRecords) MarshalToVT(dAtA []byte) (int, error)
- func (m *CacheRecords) MarshalVT() (dAtA []byte, err error)
- func (*CacheRecords) ProtoMessage()
- func (x *CacheRecords) ProtoReflect() protoreflect.Message
- func (x *CacheRecords) Reset()
- func (m *CacheRecords) SizeVT() (n int)
- func (x *CacheRecords) String() string
- func (m *CacheRecords) UnmarshalVT(dAtA []byte) error
- type ChecksumOpts
- type Hashed
Constants ¶
View Source
const ( CacheRecordTypeFile = CacheRecordType_FILE CacheRecordTypeDir = CacheRecordType_DIR CacheRecordTypeDirHeader = CacheRecordType_DIR_HEADER CacheRecordTypeSymlink = CacheRecordType_SYMLINK )
Variables ¶
View Source
var ( CacheRecordType_name = map[int32]string{ 0: "FILE", 1: "DIR", 2: "DIR_HEADER", 3: "SYMLINK", } CacheRecordType_value = map[string]int32{ "FILE": 0, "DIR": 1, "DIR_HEADER": 2, "SYMLINK": 3, } )
Enum value maps for CacheRecordType.
View Source
var File_github_com_moby_buildkit_cache_contenthash_checksum_proto protoreflect.FileDescriptor
Functions ¶
func ClearCacheContext ¶ added in v0.6.0
func ClearCacheContext(md cache.RefMetadata)
func NewFileHash ¶
NewFileHash returns new hash that is used for the builder cache keys
func SetCacheContext ¶
func SetCacheContext(ctx context.Context, md cache.RefMetadata, cc CacheContext) error
Types ¶
type CacheContext ¶
type CacheContext interface {
Checksum(ctx context.Context, ref cache.Mountable, p string, opts ChecksumOpts, s session.Group) (digest.Digest, error)
HandleChange(kind fsutil.ChangeKind, p string, fi os.FileInfo, err error) error
}
func GetCacheContext ¶
func GetCacheContext(ctx context.Context, md cache.RefMetadata) (CacheContext, error)
type CacheRecord ¶
type CacheRecord struct {
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
Type CacheRecordType `protobuf:"varint,2,opt,name=type,proto3,enum=contenthash.CacheRecordType" json:"type,omitempty"`
Linkname string `protobuf:"bytes,3,opt,name=linkname,proto3" json:"linkname,omitempty"`
// contains filtered or unexported fields
}
func (*CacheRecord) CloneMessageVT ¶ added in v0.17.0
func (m *CacheRecord) CloneMessageVT() proto.Message
func (*CacheRecord) CloneVT ¶ added in v0.17.0
func (m *CacheRecord) CloneVT() *CacheRecord
func (*CacheRecord) Descriptor
deprecated
func (*CacheRecord) Descriptor() ([]byte, []int)
Deprecated: Use CacheRecord.ProtoReflect.Descriptor instead.
func (*CacheRecord) EqualMessageVT ¶ added in v0.17.0
func (this *CacheRecord) EqualMessageVT(thatMsg proto.Message) bool
func (*CacheRecord) EqualVT ¶ added in v0.17.0
func (this *CacheRecord) EqualVT(that *CacheRecord) bool
func (*CacheRecord) GetDigest ¶ added in v0.17.0
func (x *CacheRecord) GetDigest() string
func (*CacheRecord) GetLinkname ¶
func (x *CacheRecord) GetLinkname() string
func (*CacheRecord) GetType ¶
func (x *CacheRecord) GetType() CacheRecordType
func (*CacheRecord) MarshalToSizedBufferVT ¶ added in v0.17.0
func (m *CacheRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error)