Documentation
¶
Index ¶
- Constants
- func Digest(data []byte) string
- func Extract(data []byte, dest string, desc Descriptor, limits Limits) error
- func IsPathWithin(root, candidate string) bool
- func NormalizeRelativePath(relPath string) (string, error)
- func StoreDir(dataDir string) string
- func ValidDigest(digest string) bool
- func Verify(data []byte, digest string) error
- type Client
- type Descriptor
- type Limits
- type PackOptions
- type Store
- func (s *Store) Cleanup(ctx context.Context, before time.Time, protected map[string]struct{}) (int, error)
- func (s *Store) CleanupReferenced(ctx context.Context, before time.Time, ...) (int, error)
- func (s *Store) Get(ctx context.Context, digest string) ([]byte, error)
- func (s *Store) Has(digest string) bool
- func (s *Store) Open(ctx context.Context, digest string) (*os.File, int64, error)
- func (s *Store) Put(ctx context.Context, desc Descriptor, data []byte) error
- func (s *Store) PutReader(ctx context.Context, desc Descriptor, reader io.Reader) error
- func (s *Store) Touch(ctx context.Context, digest string) (bool, error)
- func (s *Store) WithLock(ctx context.Context, fn func(context.Context) error) error
Constants ¶
View Source
const ( DefaultMaxCompressedSize int64 = 64 << 20 DefaultMaxUncompressedSize int64 = 256 << 20 DefaultMaxFiles = 8192 )
Variables ¶
This section is empty.
Functions ¶
func IsPathWithin ¶
func NormalizeRelativePath ¶
func ValidDigest ¶
Types ¶
type Descriptor ¶
type Descriptor struct {
Digest string
Size int64
DAGPath string
OriginalRef string
ResolvedRef string
}
func PackDirectory ¶
func PackDirectory(root string, opts PackOptions) (*Descriptor, []byte, error)
func PackDirectoryToFile ¶ added in v2.15.2
func PackDirectoryToFile(root, stagingDir string, opts PackOptions) (*Descriptor, string, error)
PackDirectoryToFile creates a workspace archive in stagingDir.
type Limits ¶
func DefaultLimits ¶
func DefaultLimits() Limits
type PackOptions ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Cleanup ¶ added in v2.15.4
func (s *Store) Cleanup(ctx context.Context, before time.Time, protected map[string]struct{}) (int, error)
Cleanup removes unprotected canonical bundles unused since before.
func (*Store) CleanupReferenced ¶ added in v2.15.4
func (s *Store) CleanupReferenced( ctx context.Context, before time.Time, references func(context.Context) (map[string]struct{}, error), ) (int, error)
CleanupReferenced removes expired bundles while preventing reference transitions. references must return every currently protected digest.
Click to show internal directories.
Click to hide internal directories.