Documentation
¶
Overview ¶
Package cas implements a content-addressed store on the local filesystem. Objects are identified by "sha256:<hex>" and stored under <root>/sha256/<hex[0:2]>/<hex[2:4]>/<hex>. Writes go to a temp file in the root and are renamed into place, so a crash never leaves a partial object at its final path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a content-addressed object store rooted at a directory.
func (*Store) Delete ¶
Delete removes the object. Missing objects return an error satisfying os.IsNotExist; malformed ids return a non-nil error.
func (*Store) Get ¶
func (s *Store) Get(id string) (io.ReadCloser, error)
Get opens the object for reading. The error satisfies os.IsNotExist for missing objects; malformed ids return a non-nil error as well.
Click to show internal directories.
Click to hide internal directories.