gatewaycrafter

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactOutputSummaryEntry added in v0.6.23

type ArtifactOutputSummaryEntry struct {
	Target string
	Path   string
	Salt   string
}

ArtifactOutputSummaryEntry contains a summary of output artifacts

type ExportCoordinator added in v0.6.23

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

ExportCoordinator is a thread-safe data-store used for coordinating the export of images, and artifacts (e.g. OnPull, OnImage, and Artifact summaries)

func NewExportCoordinator added in v0.6.23

func NewExportCoordinator() *ExportCoordinator

NewExportCoordinator returns a new ExportCoordinator

func (*ExportCoordinator) AddArtifactSummary added in v0.6.23

func (ec *ExportCoordinator) AddArtifactSummary(target, path, salt string)

AddArtifactSummary adds an entry of a local target and docker tag, which is used to output a summary text at the end of earthly execution

func (*ExportCoordinator) AddImage added in v0.6.23

func (ec *ExportCoordinator) AddImage(sessionID, localImage string, manifest *dockerutil.Manifest) string

AddImage creates a new entry for the value under sessionID/<v'>-<uuid> Where v' is v without special chars

func (*ExportCoordinator) AddLocalOutputSummary added in v0.6.23

func (ec *ExportCoordinator) AddLocalOutputSummary(target, dockerTag, salt string)

AddLocalOutputSummary adds an entry of a local target and docker tag, which is used to output a summary text at the end of earthly execution

func (*ExportCoordinator) AddPushedImageSummary added in v0.6.23

func (ec *ExportCoordinator) AddPushedImageSummary(target, dockerTag, salt string, pushed bool)

AddPushedImageSummary adds an entry of a pushed images, which is used to output a summary text at the end of earthly execution

func (*ExportCoordinator) GetArtifactSummary added in v0.6.23

func (ec *ExportCoordinator) GetArtifactSummary() []ArtifactOutputSummaryEntry

GetArtifactSummary returns a list of artifact summary entries, sorted by target name

func (*ExportCoordinator) GetImage added in v0.6.23

func (ec *ExportCoordinator) GetImage(k string) (*dockerutil.Manifest, string, bool)

GetImage fetches an existing entry from the data-store or returns false if none exists

func (*ExportCoordinator) GetLocalOutputSummary added in v0.6.23

func (ec *ExportCoordinator) GetLocalOutputSummary() []LocalOutputSummaryEntry

GetLocalOutputSummary returns a list of output summary entries, sorted by target name

func (*ExportCoordinator) GetPushedImageSummary added in v0.6.23

func (ec *ExportCoordinator) GetPushedImageSummary() []PushedImageSummaryEntry

GetPushedImageSummary returns a list of pushed image summary entries, sorted by target name

type GatewayCrafter

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

GatewayCrafter wraps the gwclient.Result object with a helper function which is used to deduplicate code between builder.go and wait_block.go eventually all SAVE IMAGE (and other earthly exporter) logic will be triggered via the WAIT/END PopWaitBlock() function and code that direct accesses to the underlying result instance will be removed

func NewGatewayCrafter

func NewGatewayCrafter() *GatewayCrafter

NewGatewayCrafter creates a new GatewayCrafter designed to be used to populate ref and metadata entries for the buildkit Export function

func (*GatewayCrafter) AddMeta

func (gc *GatewayCrafter) AddMeta(k string, v []byte)

AddMeta adds metadata to the results to be exported. NOTE: The use of this function (outside of gatewaycrafter.go) is deprecated. This function will become private once all SAVE IMAGE logic is triggered via the WAIT/END PopWaitBlock() function.

func (*GatewayCrafter) AddPushImageEntry

func (gc *GatewayCrafter) AddPushImageEntry(ref gwclient.Reference, refID int, imageName string, shouldPush, insecurePush bool, imageConfig *image.Image, platformStr []byte) (string, error)

AddPushImageEntry adds ref and metadata required to cause an image to be pushed

func (*GatewayCrafter) AddRef

func (gc *GatewayCrafter) AddRef(k string, ref gwclient.Reference)

AddRef adds a reference to the results to be exported. NOTE: The use of this function (outside of gatewaycrafter.go) is deprecated. This function will become private once all SAVE IMAGE logic is triggered via the WAIT/END PopWaitBlock() function.

func (*GatewayCrafter) AddSaveArtifactLocal added in v0.6.22

func (gc *GatewayCrafter) AddSaveArtifactLocal(ref gwclient.Reference, refID int, artifact, srcPath, destPath string) (string, error)

AddSaveArtifactLocal adds ref and metadata required to trigger an artifact export to the local host

func (*GatewayCrafter) GetRefsAndMetadata

func (gc *GatewayCrafter) GetRefsAndMetadata() (map[string]gwclient.Reference, map[string][]byte)

GetRefsAndMetadata fetches the result Refs and Metadata; it is not reentrant

func (*GatewayCrafter) GetResult

func (gc *GatewayCrafter) GetResult() *gwclient.Result

GetResult fetches the gwclient result object; it is not reentrant

type LocalArtifactWhiteList added in v0.6.22

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

LocalArtifactWhiteList is a set of paths which have been seen in a SAVE ARTIFACT ... AS LOCAL command

func NewLocalArtifactWhiteList added in v0.6.22

func NewLocalArtifactWhiteList() *LocalArtifactWhiteList

NewLocalArtifactWhiteList returns a new LocalArtifactWhiteList

func (*LocalArtifactWhiteList) Add added in v0.6.22

func (l *LocalArtifactWhiteList) Add(path string)

Add adds the path to the set of paths

func (*LocalArtifactWhiteList) AsList added in v0.6.22

func (l *LocalArtifactWhiteList) AsList() []string

AsList returns a copy of the set as a list

func (*LocalArtifactWhiteList) Exists added in v0.6.22

func (l *LocalArtifactWhiteList) Exists(k string) bool

Exists returns true if the path exists in the set

type LocalOutputSummaryEntry added in v0.6.23

type LocalOutputSummaryEntry struct {
	Target    string
	DockerTag string
	Salt      string
}

LocalOutputSummaryEntry contains a summary of output images

type PushedImageSummaryEntry added in v0.6.23

type PushedImageSummaryEntry struct {
	Target    string
	DockerTag string
	Salt      string
	Pushed    bool
}

PushedImageSummaryEntry contains a summary of images which were pushed

Jump to

Keyboard shortcuts

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