Documentation ¶
Index ¶
- Constants
- func NewNoopExecutorError(code models.ErrorCode, message string) *models.BaseError
- type ExecutorConfig
- type ExecutorConfigExternalHooks
- type ExecutorHandlerGetBidStrategy
- type ExecutorHandlerGetVolumeSize
- type ExecutorHandlerHasStorageLocally
- type ExecutorHandlerIsInstalled
- type ExecutorHandlerJobHandler
- type NoopExecutor
- func (e *NoopExecutor) Cancel(ctx context.Context, id string) error
- func (e *NoopExecutor) GetLogStream(ctx context.Context, request executor.LogStreamRequest) (io.ReadCloser, error)
- func (e *NoopExecutor) IsInstalled(ctx context.Context) (bool, error)
- func (e *NoopExecutor) Run(ctx context.Context, args *executor.RunCommandRequest) (*models.RunCommandResult, error)
- func (e *NoopExecutor) ShouldBid(ctx context.Context, request bidstrategy.BidStrategyRequest) (bidstrategy.BidStrategyResponse, error)
- func (e *NoopExecutor) ShouldBidBasedOnUsage(ctx context.Context, request bidstrategy.BidStrategyRequest, ...) (bidstrategy.BidStrategyResponse, error)
- func (e *NoopExecutor) Start(ctx context.Context, request *executor.RunCommandRequest) error
- func (e *NoopExecutor) Wait(ctx context.Context, executionID string) (<-chan *models.RunCommandResult, <-chan error)
Constants ¶
View Source
const NoopExecutorComponent = "Executor/Noop"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExecutorConfig ¶
type ExecutorConfig struct {
ExternalHooks ExecutorConfigExternalHooks
}
type ExecutorConfigExternalHooks ¶
type ExecutorConfigExternalHooks struct { IsInstalled ExecutorHandlerIsInstalled HasStorageLocally ExecutorHandlerHasStorageLocally GetVolumeSize ExecutorHandlerGetVolumeSize GetBidStrategy ExecutorHandlerGetBidStrategy JobHandler ExecutorHandlerJobHandler }
type ExecutorHandlerGetBidStrategy ¶ added in v0.3.24
type ExecutorHandlerGetBidStrategy func(ctx context.Context) (bidstrategy.BidStrategy, error)
type ExecutorHandlerJobHandler ¶
type ExecutorHandlerJobHandler func(ctx context.Context, jobID string, resultsDir string) (*models.RunCommandResult, error)
func DelayedJobHandler ¶ added in v0.3.25
func DelayedJobHandler(sleep time.Duration) ExecutorHandlerJobHandler
func ErrorJobHandler ¶ added in v0.3.25
func ErrorJobHandler(err error) ExecutorHandlerJobHandler
type NoopExecutor ¶
type NoopExecutor struct { Jobs []string Config ExecutorConfig // contains filtered or unexported fields }
func NewNoopExecutor ¶
func NewNoopExecutor() *NoopExecutor
func NewNoopExecutorWithConfig ¶
func NewNoopExecutorWithConfig(config ExecutorConfig) *NoopExecutor
func (*NoopExecutor) Cancel ¶ added in v1.0.4
func (e *NoopExecutor) Cancel(ctx context.Context, id string) error
func (*NoopExecutor) GetLogStream ¶ added in v1.2.2
func (e *NoopExecutor) GetLogStream(ctx context.Context, request executor.LogStreamRequest) (io.ReadCloser, error)
func (*NoopExecutor) IsInstalled ¶
func (e *NoopExecutor) IsInstalled(ctx context.Context) (bool, error)
func (*NoopExecutor) Run ¶ added in v0.3.24
func (e *NoopExecutor) Run( ctx context.Context, args *executor.RunCommandRequest, ) (*models.RunCommandResult, error)
func (*NoopExecutor) ShouldBid ¶ added in v1.0.4
func (e *NoopExecutor) ShouldBid(ctx context.Context, request bidstrategy.BidStrategyRequest) (bidstrategy.BidStrategyResponse, error)
func (*NoopExecutor) ShouldBidBasedOnUsage ¶ added in v1.0.4
func (e *NoopExecutor) ShouldBidBasedOnUsage( ctx context.Context, request bidstrategy.BidStrategyRequest, usage models.Resources, ) (bidstrategy.BidStrategyResponse, error)
func (*NoopExecutor) Start ¶ added in v1.0.4
func (e *NoopExecutor) Start(ctx context.Context, request *executor.RunCommandRequest) error
func (*NoopExecutor) Wait ¶ added in v1.0.4
func (e *NoopExecutor) Wait(ctx context.Context, executionID string) (<-chan *models.RunCommandResult, <-chan error)
Click to show internal directories.
Click to hide internal directories.