(ctx context.Context, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options)
| 1617 | } |
| 1618 | |
| 1619 | func (a *executorAdapter) ExecuteStream(ctx context.Context, auth *coreauth.Auth, req coreexecutor.Request, opts coreexecutor.Options) (result *coreexecutor.StreamResult, err error) { |
| 1620 | if a == nil || a.executor == nil || a.host.isPluginFused(a.pluginID) || !a.host.pluginIdentityCurrent(a.pluginID, a.path, a.version) { |
| 1621 | return nil, fmt.Errorf("plugin executor %s is unavailable", a.Identifier()) |
| 1622 | } |
| 1623 | defer func() { |
| 1624 | if recovered := recover(); recovered != nil { |
| 1625 | a.host.fusePlugin(a.pluginID, "Executor.ExecuteStream", recovered) |
| 1626 | result = nil |
| 1627 | err = fmt.Errorf("plugin executor %s stream panic: %v", a.Identifier(), recovered) |
| 1628 | } |
| 1629 | }() |
| 1630 | |
| 1631 | prepared, errPrepare := a.prepareExecutorCall(req, opts) |
| 1632 | if errPrepare != nil { |
| 1633 | return nil, errPrepare |
| 1634 | } |
| 1635 | pluginResp, errExecuteStream := a.executor.ExecuteStream(ctx, buildExecutorRequest(a.host, a.provider, auth, prepared.req, prepared.opts)) |
| 1636 | if errExecuteStream != nil { |
| 1637 | return nil, errExecuteStream |
| 1638 | } |
| 1639 | return &coreexecutor.StreamResult{ |
| 1640 | Headers: cloneHeader(pluginResp.Headers), |
| 1641 | Chunks: mapExecutorStreamChunks(ctx, a.translateExecutorStreamChunks(ctx, prepared, pluginResp.Chunks)), |
| 1642 | }, nil |
| 1643 | } |
| 1644 | |
| 1645 | func (a *executorAdapter) Refresh(ctx context.Context, auth *coreauth.Auth) (refreshed *coreauth.Auth, err error) { |
| 1646 | if a == nil || a.executor == nil || a.host.isPluginFused(a.pluginID) || !a.host.pluginIdentityCurrent(a.pluginID, a.path, a.version) { |
nothing calls this directly
no test coverage detected