Documentation ¶
Overview ¶
Package executor provides an abstraction of a job executor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCIDIsNotValid = fmt.Errorf("cid is not valid") ErrJobNotSuccessful = fmt.Errorf("job was not successful") )
View Source
var ErrInternalJobNotFound = fmt.Errorf("internal job not found")
View Source
var ErrOnlyOneInput = fmt.Errorf("must only be one input")
Functions ¶
This section is empty.
Types ¶
type BacalhauExecutor ¶
type BacalhauExecutor struct {
Client *publicapi.RequesterAPIClient
}
func (*BacalhauExecutor) Execute ¶
func (b *BacalhauExecutor) Execute(ctx context.Context, rawJob interface{}) (Result, error)
func (*BacalhauExecutor) Render ¶
func (b *BacalhauExecutor) Render(job config.Job, inputs []ExecutorIOSpec, outputs []ExecutorIOSpec) (interface{}, error)
type Executor ¶
type Executor interface { Execute(context.Context, interface{}) (Result, error) Render(config.Job, []ExecutorIOSpec, []ExecutorIOSpec) (interface{}, error) }
Executor abstracts the execution of a job
func NewBacalhauExecutor ¶
func NewBacalhauExecutor() Executor
func NewInternalExecutor ¶ added in v0.1.1
func NewInternalExecutor() Executor
type ExecutorIOSpec ¶
type InternalJob ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.