artifact

package
v0.101.7 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapStore added in v0.100.0

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

MapStore represents the fully rendered manifests build from the holos rendering pipeline. Files are organized by keys representing paths relative to the current working directory. Values represent the file content.

func NewStore added in v0.100.0

func NewStore() *MapStore

func (*MapStore) Get added in v0.100.0

func (a *MapStore) Get(path string) (data []byte, ok bool)

Get gets the content of an artifact with read locking.

func (*MapStore) Keys added in v0.100.0

func (a *MapStore) Keys() []string

func (*MapStore) Save added in v0.100.0

func (a *MapStore) Save(dir, path string) error

Save writes a file to the filesystem.

func (*MapStore) Set added in v0.100.0

func (a *MapStore) Set(path string, data []byte) error

Set sets an artifact file with write locking. Set returns an error if the artifact was previously set.

type Store added in v0.100.0

type Store interface {
	Get(path string) (data []byte, ok bool)
	Set(path string, data []byte) error
	// Save previously set path to dir preserving directories.
	Save(dir, path string) error
}

Store sets and gets data for file artifacts.

Concrete values must ensure Set is write once, returning an error if a given FilePath was previously Set. Concrete values must be safe for concurrent reads and writes. Use NewStore to create a new concrete value.

Jump to

Keyboard shortcuts

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