Help us shape the future of Go! Take the 2026 Go Developer Survey

plugin

package
v4.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

Driver implements the ArtifactDriver interface by making gRPC calls to a plugin service

func NewDriver

func NewDriver(ctx context.Context, pluginName wfv1.ArtifactPluginName, socketPath string, connectionTimeout time.Duration) (*Driver, error)

NewDriver creates a new plugin artifact driver

func (*Driver) Close

func (d *Driver) Close() error

Close closes the gRPC connection

func (*Driver) Delete

func (d *Driver) Delete(ctx context.Context, artifactRef *wfv1.Artifact) error

Delete implements ArtifactDriver.Delete by calling the plugin service

func (*Driver) IsDirectory

func (d *Driver) IsDirectory(ctx context.Context, artifactRef *wfv1.Artifact) (bool, error)

IsDirectory implements ArtifactDriver.IsDirectory by calling the plugin service

func (*Driver) ListObjects

func (d *Driver) ListObjects(ctx context.Context, artifactRef *wfv1.Artifact) ([]string, error)

ListObjects implements ArtifactDriver.ListObjects by calling the plugin service

func (*Driver) Load

func (d *Driver) Load(ctx context.Context, inputArtifact *wfv1.Artifact, path string) error

Load implements ArtifactDriver.Load by calling the plugin service

func (*Driver) OpenStream

func (d *Driver) OpenStream(ctx context.Context, a *wfv1.Artifact) (io.ReadCloser, error)

OpenStream implements ArtifactDriver.OpenStream by calling the plugin service

func (*Driver) Save

func (d *Driver) Save(ctx context.Context, path string, outputArtifact *wfv1.Artifact) error

Save implements ArtifactDriver.Save by calling the plugin service

func (*Driver) SaveStream added in v4.1.0

func (d *Driver) SaveStream(ctx context.Context, reader io.Reader, outputArtifact *wfv1.Artifact) error

SaveStream implements ArtifactDriver.SaveStream. If the plugin advertises streaming support (per GetCapabilities), the reader is streamed directly with no local buffering. Otherwise it falls back to buffering to a temp file and calling the existing unary Save, so a plugin that predates streaming keeps working.

Capability is checked before reader is touched: once GetCapabilities confirms streaming support and chunks start being sent, a mid-stream failure is returned as an error rather than retried via the fallback, since the reader may already be partially consumed and cannot be rewound.

Jump to

Keyboard shortcuts

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