Documentation
¶
Index ¶
- type Driver
- func (d *Driver) Close() error
- func (d *Driver) Delete(ctx context.Context, artifactRef *wfv1.Artifact) error
- func (d *Driver) IsDirectory(ctx context.Context, artifactRef *wfv1.Artifact) (bool, error)
- func (d *Driver) ListObjects(ctx context.Context, artifactRef *wfv1.Artifact) ([]string, error)
- func (d *Driver) Load(ctx context.Context, inputArtifact *wfv1.Artifact, path string) error
- func (d *Driver) OpenStream(ctx context.Context, a *wfv1.Artifact) (io.ReadCloser, error)
- func (d *Driver) Save(ctx context.Context, path string, outputArtifact *wfv1.Artifact) error
- func (d *Driver) SaveStream(ctx context.Context, reader io.Reader, outputArtifact *wfv1.Artifact) error
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) IsDirectory ¶
IsDirectory implements ArtifactDriver.IsDirectory by calling the plugin service
func (*Driver) ListObjects ¶
ListObjects implements ArtifactDriver.ListObjects by calling the plugin service
func (*Driver) OpenStream ¶
OpenStream implements ArtifactDriver.OpenStream by calling the plugin service
func (*Driver) SaveStream ¶
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.