pipes

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone added in v1.8.0

func Clone(pipe nuggit.Pipe) nuggit.Pipe

func Deps added in v1.8.1

func Flatten

func Flatten(idx *Index, pipe nuggit.Pipe) (nuggit.Pipe, error)

Flatten recursively replaces all pipe actions with their definitions returning a new Pipe or an error if the process failed. The flattened pipe is fully hermetric, making no references to other pipes. If the given pipe definition is not present in referencedPipes a ErrInvalidArgument error is returned.

NOTE: The returned pipe will have a different digest than the input pipe. If the value in the index was qualified it will be rendered useless.

TODO: check the digests of pipes in referencedPipes.

Types

type Index added in v1.8.0

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

func (*Index) Add added in v1.8.0

func (i *Index) Add(name, digest string, pipe nuggit.Pipe)

func (*Index) All added in v1.8.1

func (*Index) Get added in v1.8.0

func (i *Index) Get(name, digest string) (nuggit.Pipe, bool)

func (*Index) GetUnique added in v1.8.0

func (i *Index) GetUnique(name string) (digest string, ok bool)

func (*Index) GetUniquePipe added in v1.8.1

func (i *Index) GetUniquePipe(name string) (nuggit.Pipe, bool)

func (*Index) Has added in v1.8.0

func (i *Index) Has(name, digest string) bool

func (*Index) HasName added in v1.8.0

func (i *Index) HasName(name string) bool

func (*Index) Keys added in v1.8.1

func (i *Index) Keys() iter.Seq[integrity.NameDigest]

func (*Index) Qualified added in v1.8.2

func (i *Index) Qualified() (*Index, error)

Qualified returns a new index with all pipes qualified by digest.

func (*Index) Qualify added in v1.8.2

func (idx *Index) Qualify(pipe nuggit.Pipe) (nuggit.Pipe, error)

Qualify replaces all pipe references with a valid digest.

Qualify does not update the pipe digest in the index.

Use Qualified to create a new qualified index.

func (*Index) Remove added in v1.8.1

func (i *Index) Remove(name, digest string)

func (*Index) Reset added in v1.8.0

func (i *Index) Reset()

func (*Index) Topo added in v1.8.2

func (i *Index) Topo() iter.Seq2[integrity.NameDigest, error]

Topo proceeds over the keys of the index topologically.

If there are cycles in the topological order an error is passed to the yield function. Any other error is passed to yield as well.

Topo does not attempt to Qualify names when no digest is present.

func (*Index) Values added in v1.8.1

func (i *Index) Values() iter.Seq[nuggit.Pipe]

Jump to

Keyboard shortcuts

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