graph

package
v2.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

Memory is a memory based PredecessorFinder.

func NewMemory

func NewMemory() *Memory

NewMemory creates a new memory PredecessorFinder.

func (*Memory) DigestSet added in v2.4.0

func (m *Memory) DigestSet() set.Set[digest.Digest]

DigestSet returns the set of node digest in memory.

func (*Memory) Exists added in v2.4.0

func (m *Memory) Exists(node ocispec.Descriptor) bool

Exists checks if the node exists in the graph

func (*Memory) Index

func (m *Memory) Index(ctx context.Context, fetcher content.Fetcher, node ocispec.Descriptor) error

Index indexes predecessors for each direct successor of the given node.

func (*Memory) IndexAll

func (m *Memory) IndexAll(ctx context.Context, fetcher content.Fetcher, node ocispec.Descriptor) error

Index indexes predecessors for all the successors of the given node.

func (*Memory) Predecessors

func (m *Memory) Predecessors(_ 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.

func (*Memory) Remove added in v2.4.0

func (m *Memory) Remove(node ocispec.Descriptor) []ocispec.Descriptor

Remove removes the node from its predecessors and successors, and returns the dangling root nodes caused by the deletion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL