Load implements ArtifactDriver.Load by calling the plugin service
(ctx context.Context, inputArtifact *wfv1.Artifact, path string)
| 138 | |
| 139 | // Load implements ArtifactDriver.Load by calling the plugin service |
| 140 | func (d *Driver) Load(ctx context.Context, inputArtifact *wfv1.Artifact, path string) error { |
| 141 | grpcArtifact := convertToGRPC(inputArtifact) |
| 142 | resp, err := d.client.Load(ctx, &artifact.LoadArtifactRequest{ |
| 143 | InputArtifact: grpcArtifact, |
| 144 | Path: path, |
| 145 | }) |
| 146 | if err != nil { |
| 147 | return fmt.Errorf("plugin %s load failed: %w", d.pluginName, err) |
| 148 | } |
| 149 | if !resp.Success { |
| 150 | return fmt.Errorf("plugin %s load failed: %s", d.pluginName, resp.Error) |
| 151 | } |
| 152 | return nil |
| 153 | } |
| 154 | |
| 155 | // OpenStream implements ArtifactDriver.OpenStream by calling the plugin service |
| 156 | func (d *Driver) OpenStream(ctx context.Context, a *wfv1.Artifact) (io.ReadCloser, error) { |
nothing calls this directly
no test coverage detected