graph

package
v2.0.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 7 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) 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. There is no data consistency issue as long as deletion is not implemented for the underlying storage.

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. There is no data consistency issue as long as deletion is not implemented for the underlying storage.

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.

Jump to

Keyboard shortcuts

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