Documentation ¶
Overview ¶
Package memory provides implementation of a memory backed content store.
Index ¶
- type Store
- func (s *Store) Exists(ctx context.Context, target ocispec.Descriptor) (bool, error)
- func (s *Store) Fetch(ctx context.Context, target ocispec.Descriptor) (io.ReadCloser, error)
- func (s *Store) Predecessors(ctx context.Context, node ocispec.Descriptor) ([]ocispec.Descriptor, error)
- func (s *Store) Push(ctx context.Context, expected ocispec.Descriptor, reader io.Reader) error
- func (s *Store) Resolve(ctx context.Context, reference string) (ocispec.Descriptor, error)
- func (s *Store) Tag(ctx context.Context, desc ocispec.Descriptor, reference string) error
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 represents a memory based store, which implements `oras.Target`.
func (*Store) Fetch ¶
func (s *Store) Fetch(ctx context.Context, target ocispec.Descriptor) (io.ReadCloser, error)
Fetch fetches the content identified by the descriptor.
func (*Store) Predecessors ¶
func (s *Store) Predecessors(ctx context.Context, node ocispec.Descriptor) ([]ocispec.Descriptor, error)
Predecessors returns the nodes directly pointing to the current node. Predecessors returns nil without error if the node does not exists in the store. Like other operations, calling Predecessors() is go-routine safe. However, it does not necessarily correspond to any consistent snapshot of the stored contents.
Click to show internal directories.
Click to hide internal directories.