Documentation
¶
Overview ¶
Package materialize owns the verified digest-keyed file store beneath a target deployment root and safe placement into out-of-place realizations.
Index ¶
- Variables
- type PersistentKind
- type Result
- type Store
- func (s Store) BindPersistent(...) error
- func (s Store) BindPersistentForPublication(stagingDir, publishedDir, repositoryID, resourcePath, declared, ... string, ...) error
- func (s Store) Path(digest string) (string, error)
- func (s Store) PlaceImmutable(digest string, size int64, realizationDir, relativePath string) error
- func (s Store) Put(ctx context.Context, digest string, size int64, src io.Reader) (Result, error)
- func (s Store) Verify(digest string, size int64) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type PersistentKind ¶
type PersistentKind string
const ( PersistentFile PersistentKind = "file" PersistentDirectory PersistentKind = "directory" )
type Store ¶
type Store struct{ DeployRoot string }
func (Store) BindPersistent ¶
func (s Store) BindPersistent(realizationDir, repositoryID, resourcePath, declared, realizationRelative string, kind PersistentKind) error
BindPersistent creates a target-scoped persistent directory and installs a relative symlink at an exact realization-relative path. Both paths are containment checked and a collision is refused.
func (Store) BindPersistentForPublication ¶
func (s Store) BindPersistentForPublication(stagingDir, publishedDir, repositoryID, resourcePath, declared, realizationRelative string, kind PersistentKind) error
BindPersistentForPublication creates the symlink in stagingDir but computes its relative target from publishedDir. Atomic directory publication may change path depth, so a link made relative to staging itself would escape or point at the wrong shared root after rename.
func (Store) PlaceImmutable ¶
PlaceImmutable verifies the store object then hard-links it into a new realization. It refuses every pre-existing destination.