MCPcopy
hub / github.com/argoproj/argo-workflows / ArtifactDriver

Interface ArtifactDriver

workflow/artifacts/common/common.go:12–32  ·  view source on GitHub ↗

ArtifactDriver is the interface for loading and saving of artifacts

Source from the content-addressed store, hash-verified

10
11// ArtifactDriver is the interface for loading and saving of artifacts
12type ArtifactDriver interface {
13 // Load accepts an artifact source URL and places it at specified path
14 Load(ctx context.Context, inputArtifact *v1alpha1.Artifact, path string) error
15
16 // OpenStream opens an artifact for reading. If the artifact is a file,
17 // then the file should be opened. If the artifact is a directory, the
18 // driver may return that as a tarball. OpenStream is intended to be efficient,
19 // so implementations should minimise usage of disk, CPU and memory.
20 // Implementations must not implement retry mechanisms. This will be handled by
21 // the client, so would result in O(nm) cost.
22 OpenStream(ctx context.Context, a *v1alpha1.Artifact) (io.ReadCloser, error)
23
24 // Save uploads the path to artifact destination
25 Save(ctx context.Context, path string, outputArtifact *v1alpha1.Artifact) error
26
27 Delete(ctx context.Context, artifact *v1alpha1.Artifact) error
28
29 ListObjects(ctx context.Context, artifact *v1alpha1.Artifact) ([]string, error)
30
31 IsDirectory(ctx context.Context, artifact *v1alpha1.Artifact) (bool, error)
32}
33
34// ErrDeleteNotSupported Sentinel error definition for artifact deletion
35var ErrDeleteNotSupported = errors.New("delete not supported for this artifact storage, please check" +

Callers 21

loadArtifactsMethod · 0.65
LoadMethod · 0.65
loadFunction · 0.65
LoadMethod · 0.65
LoadToStreamFunction · 0.65
returnArtifactMethod · 0.65
OpenStreamMethod · 0.65
OpenStreamMethod · 0.65
RetryArchivedWorkflowMethod · 0.65
saveArtifactFromFileMethod · 0.65
DehydrateMethod · 0.65
SaveMethod · 0.65

Implementers 13

artifactServiceClientpkg/apiclient/artifact/artifact.pb.go
UnimplementedArtifactServiceServerpkg/apiclient/artifact/artifact.pb.go
Driverworkflow/artifacts/plugin/plugin.go
ArtifactDriverworkflow/artifacts/hdfs/hdfs.go
ArtifactDriverworkflow/artifacts/http/http.go
ArtifactDriverworkflow/artifacts/azure/azure.go
ArtifactDriverworkflow/artifacts/git/git.go
driverworkflow/artifacts/logging/driver.go
ArtifactDriverworkflow/artifacts/gcs/gcs.go
ArtifactDriverworkflow/artifacts/raw/raw.go
ArtifactDriverworkflow/artifacts/oss/oss.go
ArtifactDriverworkflow/artifacts/s3/s3.go

Calls

no outgoing calls

Tested by

no test coverage detected