Documentation ¶
Overview ¶
Package compute is a generated GoMock package.
Index ¶
- Constants
- func RespondedToBidEvent(response *bidstrategy.BidStrategyResponse) models.Event
- type AskForBidRequest
- type AskForBidResponse
- type BaseEndpoint
- func (s BaseEndpoint) AskForBid(ctx context.Context, request AskForBidRequest) (AskForBidResponse, error)
- func (s BaseEndpoint) BidAccepted(ctx context.Context, request BidAcceptedRequest) (BidAcceptedResponse, error)
- func (s BaseEndpoint) BidRejected(ctx context.Context, request BidRejectedRequest) (BidRejectedResponse, error)
- func (s BaseEndpoint) CancelExecution(ctx context.Context, request CancelExecutionRequest) (CancelExecutionResponse, error)
- func (s BaseEndpoint) ExecutionLogs(ctx context.Context, request ExecutionLogsRequest) (<-chan *concurrency.AsyncResult[models.ExecutionLog], error)
- func (s BaseEndpoint) GetNodeID() string
- type BaseEndpointParams
- type BaseExecutor
- func (e *BaseExecutor) Cancel(ctx context.Context, state store.LocalExecutionState) (err error)
- func (e *BaseExecutor) Run(ctx context.Context, state store.LocalExecutionState) (err error)
- func (e *BaseExecutor) Start(ctx context.Context, execution *models.Execution) *StartResult
- func (e *BaseExecutor) Wait(ctx context.Context, state store.LocalExecutionState) (*models.RunCommandResult, error)
- type BaseExecutorParams
- type BidAcceptedRequest
- type BidAcceptedResponse
- type BidRejectedRequest
- type BidRejectedResponse
- type BidResult
- type Bidder
- type BidderParams
- type BidderRequest
- type Callback
- type CallbackMock
- func (c CallbackMock) OnBidComplete(ctx context.Context, result BidResult)
- func (c CallbackMock) OnCancelComplete(ctx context.Context, result CancelResult)
- func (c CallbackMock) OnComputeFailure(ctx context.Context, err ComputeError)
- func (c CallbackMock) OnRunComplete(ctx context.Context, result RunResult)
- type CancelExecutionRequest
- type CancelExecutionResponse
- type CancelResult
- type ChainedCallback
- func (c ChainedCallback) OnBidComplete(ctx context.Context, result BidResult)
- func (c ChainedCallback) OnCancelComplete(ctx context.Context, result CancelResult)
- func (c ChainedCallback) OnComputeFailure(ctx context.Context, err ComputeError)
- func (c ChainedCallback) OnRunComplete(ctx context.Context, result RunResult)
- type ChainedCallbackParams
- type ComputeError
- type Endpoint
- type ErrExecTimeout
- type ExecutionLogsRequest
- type ExecutionLogsResponse
- type ExecutionMetadata
- type Executor
- type ExecutorBuffer
- func (s *ExecutorBuffer) Cancel(_ context.Context, localExecutionState store.LocalExecutionState) error
- func (s *ExecutorBuffer) EnqueuedExecutionsCount() int
- func (s *ExecutorBuffer) Run(ctx context.Context, localExecutionState store.LocalExecutionState) error
- func (s *ExecutorBuffer) RunningExecutions() []store.LocalExecutionState
- type ExecutorBufferParams
- type InputCleanupFn
- type ManagementClient
- type ManagementClientParams
- type ManagementEndpoint
- type MockCallback
- func (m *MockCallback) EXPECT() *MockCallbackMockRecorder
- func (m *MockCallback) OnBidComplete(ctx context.Context, result BidResult)
- func (m *MockCallback) OnCancelComplete(ctx context.Context, result CancelResult)
- func (m *MockCallback) OnComputeFailure(ctx context.Context, err ComputeError)
- func (m *MockCallback) OnRunComplete(ctx context.Context, result RunResult)
- type MockCallbackMockRecorder
- func (mr *MockCallbackMockRecorder) OnBidComplete(ctx, result any) *gomock.Call
- func (mr *MockCallbackMockRecorder) OnCancelComplete(ctx, result any) *gomock.Call
- func (mr *MockCallbackMockRecorder) OnComputeFailure(ctx, err any) *gomock.Call
- func (mr *MockCallbackMockRecorder) OnRunComplete(ctx, result any) *gomock.Call
- type MockEndpoint
- func (m *MockEndpoint) AskForBid(arg0 context.Context, arg1 AskForBidRequest) (AskForBidResponse, error)
- func (m *MockEndpoint) BidAccepted(arg0 context.Context, arg1 BidAcceptedRequest) (BidAcceptedResponse, error)
- func (m *MockEndpoint) BidRejected(arg0 context.Context, arg1 BidRejectedRequest) (BidRejectedResponse, error)
- func (m *MockEndpoint) CancelExecution(arg0 context.Context, arg1 CancelExecutionRequest) (CancelExecutionResponse, error)
- func (m *MockEndpoint) EXPECT() *MockEndpointMockRecorder
- func (m *MockEndpoint) ExecutionLogs(ctx context.Context, request ExecutionLogsRequest) (<-chan *concurrency.AsyncResult[models.ExecutionLog], error)
- type MockEndpointMockRecorder
- func (mr *MockEndpointMockRecorder) AskForBid(arg0, arg1 any) *gomock.Call
- func (mr *MockEndpointMockRecorder) BidAccepted(arg0, arg1 any) *gomock.Call
- func (mr *MockEndpointMockRecorder) BidRejected(arg0, arg1 any) *gomock.Call
- func (mr *MockEndpointMockRecorder) CancelExecution(arg0, arg1 any) *gomock.Call
- func (mr *MockEndpointMockRecorder) ExecutionLogs(ctx, request any) *gomock.Call
- type MockExecutor
- type MockExecutorMockRecorder
- type MockManagementEndpoint
- func (m *MockManagementEndpoint) EXPECT() *MockManagementEndpointMockRecorder
- func (m *MockManagementEndpoint) Register(arg0 context.Context, arg1 requests.RegisterRequest) (*requests.RegisterResponse, error)
- func (m *MockManagementEndpoint) UpdateInfo(arg0 context.Context, arg1 requests.UpdateInfoRequest) (*requests.UpdateInfoResponse, error)
- func (m *MockManagementEndpoint) UpdateResources(arg0 context.Context, arg1 requests.UpdateResourcesRequest) (*requests.UpdateResourcesResponse, error)
- type MockManagementEndpointMockRecorder
- type NodeInfoDecorator
- type NodeInfoDecoratorParams
- type RegistrationFile
- type ResultsPath
- type RoutingMetadata
- type RunResult
- type StartResult
- type Startup
Constants ¶
const ( EventTopicExecutionBidding models.EventTopic = "Requesting Node" EventTopicExecutionDownloading models.EventTopic = "Downloading Inputs" EventTopicExecutionPreparing models.EventTopic = "Preparing Environment" EventTopicExecutionRunning models.EventTopic = "Running Execution" EventTopicExecutionPublishing models.EventTopic = "Publishing Results" )
const StorageDirectoryPerms = 0755
Variables ¶
This section is empty.
Functions ¶
func RespondedToBidEvent ¶ added in v1.3.1
func RespondedToBidEvent(response *bidstrategy.BidStrategyResponse) models.Event
Types ¶
type AskForBidRequest ¶
type AskForBidRequest struct { RoutingMetadata // Execution specifies the job to be executed. Execution *models.Execution // WaitForApproval specifies whether the compute node should wait for the requester to approve the bid. // if set to true, the compute node will not start the execution until the requester approves the bid. // If set to false, the compute node will automatically start the execution after bidding and when resources are available. WaitForApproval bool }
type AskForBidResponse ¶
type AskForBidResponse struct {
ExecutionMetadata
}
type BaseEndpoint ¶
type BaseEndpoint struct {
// contains filtered or unexported fields
}
Base implementation of Endpoint
func NewBaseEndpoint ¶
func NewBaseEndpoint(params BaseEndpointParams) BaseEndpoint
func (BaseEndpoint) AskForBid ¶
func (s BaseEndpoint) AskForBid(ctx context.Context, request AskForBidRequest) (AskForBidResponse, error)
func (BaseEndpoint) BidAccepted ¶
func (s BaseEndpoint) BidAccepted(ctx context.Context, request BidAcceptedRequest) (BidAcceptedResponse, error)
func (BaseEndpoint) BidRejected ¶
func (s BaseEndpoint) BidRejected(ctx context.Context, request BidRejectedRequest) (BidRejectedResponse, error)
func (BaseEndpoint) CancelExecution ¶
func (s BaseEndpoint) CancelExecution(ctx context.Context, request CancelExecutionRequest) (CancelExecutionResponse, error)
func (BaseEndpoint) ExecutionLogs ¶ added in v0.3.26
func (s BaseEndpoint) ExecutionLogs(ctx context.Context, request ExecutionLogsRequest) ( <-chan *concurrency.AsyncResult[models.ExecutionLog], error)
func (BaseEndpoint) GetNodeID ¶
func (s BaseEndpoint) GetNodeID() string
type BaseEndpointParams ¶
type BaseEndpointParams struct { ID string ExecutionStore store.ExecutionStore UsageCalculator capacity.UsageCalculator Bidder Bidder Executor Executor LogServer *logstream.Server }
type BaseExecutor ¶
type BaseExecutor struct { ID string Storages storage.StorageProvider // contains filtered or unexported fields }
BaseExecutor is the base implementation for backend service. All operations are executed asynchronously, and a callback is used to notify the caller of the result.
func NewBaseExecutor ¶
func NewBaseExecutor(params BaseExecutorParams) *BaseExecutor
func (*BaseExecutor) Cancel ¶
func (e *BaseExecutor) Cancel(ctx context.Context, state store.LocalExecutionState) (err error)
Cancel the execution.
func (*BaseExecutor) Run ¶
func (e *BaseExecutor) Run(ctx context.Context, state store.LocalExecutionState) (err error)
Run the execution after it has been accepted, and propose a result to the requester to be verified.
func (*BaseExecutor) Start ¶ added in v1.0.4
func (e *BaseExecutor) Start(ctx context.Context, execution *models.Execution) *StartResult
func (*BaseExecutor) Wait ¶ added in v1.0.4
func (e *BaseExecutor) Wait(ctx context.Context, state store.LocalExecutionState) (*models.RunCommandResult, error)
type BaseExecutorParams ¶
type BaseExecutorParams struct { ID string Callback Callback Store store.ExecutionStore Storages storage.StorageProvider StorageDirectory string Executors executor.ExecutorProvider ResultsPath ResultsPath Publishers publisher.PublisherProvider FailureInjectionConfig models.FailureInjectionComputeConfig }
type BidAcceptedRequest ¶
type BidAcceptedRequest struct { RoutingMetadata ExecutionID string Accepted bool Justification string }
type BidAcceptedResponse ¶
type BidAcceptedResponse struct {
ExecutionMetadata
}
type BidRejectedRequest ¶
type BidRejectedRequest struct { RoutingMetadata ExecutionID string Justification string }
type BidRejectedResponse ¶
type BidRejectedResponse struct {
ExecutionMetadata
}
type BidResult ¶ added in v0.3.26
type BidResult struct { RoutingMetadata ExecutionMetadata Accepted bool Wait bool Event models.Event }
BidResult is the result of the compute node bidding on a job that is returned to the caller through a Callback.
type Bidder ¶ added in v0.3.26
type Bidder struct {
// contains filtered or unexported fields
}
func NewBidder ¶ added in v0.3.26
func NewBidder(params BidderParams) Bidder
func (Bidder) ReturnBidResult ¶ added in v0.3.26
func (b Bidder) ReturnBidResult( ctx context.Context, localExecutionState store.LocalExecutionState, response *bidstrategy.BidStrategyResponse, )
func (Bidder) RunBidding ¶ added in v0.3.26
func (b Bidder) RunBidding(ctx context.Context, bidRequest *BidderRequest)
TODO: evaluate the need for async bidding and marking bids as waiting https://github.com/bacalhau-project/bacalhau/issues/3732
type BidderParams ¶ added in v0.3.26
type BidderParams struct { NodeID string SemanticStrategy []bidstrategy.SemanticBidStrategy ResourceStrategy []bidstrategy.ResourceBidStrategy UsageCalculator capacity.UsageCalculator Store store.ExecutionStore Executor Executor Callback Callback GetApproveURL func() *url.URL }
type BidderRequest ¶ added in v1.3.1
type BidderRequest struct { SourcePeerID string // Execution specifies the job to be executed. Execution *models.Execution // WaitForApproval specifies whether the compute node should wait for the requester to approve the bid. // if set to true, the compute node will not start the execution until the requester approves the bid. // If set to false, the compute node will automatically start the execution after bidding and when resources are available. WaitForApproval bool // ResourceUsage specifies the requested resources for this execution ResourceUsage *models.Resources }
type Callback ¶
type Callback interface { OnBidComplete(ctx context.Context, result BidResult) OnRunComplete(ctx context.Context, result RunResult) OnCancelComplete(ctx context.Context, result CancelResult) OnComputeFailure(ctx context.Context, err ComputeError) }
Callback Callbacks are used to notify the caller of the result of a job execution.
type CallbackMock ¶ added in v0.3.26
type CallbackMock struct { OnBidCompleteHandler func(ctx context.Context, result BidResult) OnCancelCompleteHandler func(ctx context.Context, result CancelResult) OnComputeFailureHandler func(ctx context.Context, err ComputeError) OnRunCompleteHandler func(ctx context.Context, result RunResult) }
func (CallbackMock) OnBidComplete ¶ added in v0.3.26
func (c CallbackMock) OnBidComplete(ctx context.Context, result BidResult)
OnBidComplete implements Callback
func (CallbackMock) OnCancelComplete ¶ added in v0.3.26
func (c CallbackMock) OnCancelComplete(ctx context.Context, result CancelResult)
OnCancelComplete implements Callback
func (CallbackMock) OnComputeFailure ¶ added in v0.3.26
func (c CallbackMock) OnComputeFailure(ctx context.Context, err ComputeError)
OnComputeFailure implements Callback
func (CallbackMock) OnRunComplete ¶ added in v0.3.26
func (c CallbackMock) OnRunComplete(ctx context.Context, result RunResult)
OnRunComplete implements Callback
type CancelExecutionRequest ¶
type CancelExecutionRequest struct { RoutingMetadata ExecutionID string Justification string }
type CancelExecutionResponse ¶
type CancelExecutionResponse struct {
ExecutionMetadata
}
type CancelResult ¶
type CancelResult struct { RoutingMetadata ExecutionMetadata }
CancelResult Result of a job cancel that is returned to the caller through a Callback.
type ChainedCallback ¶
type ChainedCallback struct {
// contains filtered or unexported fields
}
ChainedCallback Callback that chains multiple callbacks and delegates the calls to them.
func NewChainedCallback ¶
func NewChainedCallback(params ChainedCallbackParams) *ChainedCallback
func (ChainedCallback) OnBidComplete ¶ added in v0.3.26
func (c ChainedCallback) OnBidComplete(ctx context.Context, result BidResult)
func (ChainedCallback) OnCancelComplete ¶
func (c ChainedCallback) OnCancelComplete(ctx context.Context, result CancelResult)
func (ChainedCallback) OnComputeFailure ¶
func (c ChainedCallback) OnComputeFailure(ctx context.Context, err ComputeError)
func (ChainedCallback) OnRunComplete ¶
func (c ChainedCallback) OnRunComplete(ctx context.Context, result RunResult)
type ChainedCallbackParams ¶
type ChainedCallbackParams struct {
Callbacks []Callback
}
type ComputeError ¶
type ComputeError struct { RoutingMetadata ExecutionMetadata Event models.Event }
func (ComputeError) Error ¶
func (e ComputeError) Error() string
type Endpoint ¶
type Endpoint interface { // AskForBid asks for a bid for a given job, which will assign executionID to the job and return a bid // is interested in bidding on. AskForBid(context.Context, AskForBidRequest) (AskForBidResponse, error) // BidAccepted accepts a bid for a given executionID, which will trigger executing the job in the backend. // The execution can be synchronous or asynchronous, depending on the backend implementation. BidAccepted(context.Context, BidAcceptedRequest) (BidAcceptedResponse, error) // BidRejected rejects a bid for a given executionID. BidRejected(context.Context, BidRejectedRequest) (BidRejectedResponse, error) // CancelExecution cancels a job for a given executionID. CancelExecution(context.Context, CancelExecutionRequest) (CancelExecutionResponse, error) // ExecutionLogs returns the address of a suitable log server ExecutionLogs(ctx context.Context, request ExecutionLogsRequest) (<-chan *concurrency.AsyncResult[models.ExecutionLog], error) }
Endpoint is the frontend and entry point to the compute node. Requesters, whether through API, CLI or other means, do interact with the frontend service to submit jobs, ask for bids, accept or reject bids, etc.
type ErrExecTimeout ¶ added in v1.5.0
ErrExecTimeout is an error that is returned when an execution times out.
func NewErrExecTimeout ¶ added in v1.5.0
func NewErrExecTimeout(executionTimeout time.Duration) ErrExecTimeout
func (ErrExecTimeout) Details ¶ added in v1.5.0
func (e ErrExecTimeout) Details() map[string]string
func (ErrExecTimeout) Error ¶ added in v1.5.0
func (e ErrExecTimeout) Error() string
func (ErrExecTimeout) Retryable ¶ added in v1.5.0
func (e ErrExecTimeout) Retryable() bool
type ExecutionLogsRequest ¶ added in v0.3.26
type ExecutionLogsRequest struct { RoutingMetadata ExecutionID string Tail bool Follow bool }
type ExecutionLogsResponse ¶ added in v0.3.26
type ExecutionMetadata ¶
func NewExecutionMetadata ¶
func NewExecutionMetadata(execution *models.Execution) ExecutionMetadata
type Executor ¶
type Executor interface { // Run triggers the execution of a job. Run(ctx context.Context, localExecutionState store.LocalExecutionState) error // Cancel cancels the execution of a job. Cancel(ctx context.Context, localExecutionState store.LocalExecutionState) error }
Executor Backend service that is responsible for running and publishing executions. Implementations can be synchronous or asynchronous by using Callbacks.
type ExecutorBuffer ¶
type ExecutorBuffer struct { ID string // contains filtered or unexported fields }
ExecutorBuffer is a backend.Executor implementation that buffers executions locally until enough capacity is available to be able to run them. The buffer accepts a delegate backend.Executor that will be used to run the jobs. The buffer is implemented as a FIFO queue, where the order of the executions is determined by the order in which they were enqueued. However, an execution with high resource usage requirements might be skipped if there are newer jobs with lower resource usage requirements that can be executed immediately. This is done to improve utilization of compute nodes, though it might result in starvation and should be re-evaluated in the future.
func NewExecutorBuffer ¶
func NewExecutorBuffer(params ExecutorBufferParams) *ExecutorBuffer
func (*ExecutorBuffer) Cancel ¶
func (s *ExecutorBuffer) Cancel(_ context.Context, localExecutionState store.LocalExecutionState) error
func (*ExecutorBuffer) EnqueuedExecutionsCount ¶ added in v1.0.4
func (s *ExecutorBuffer) EnqueuedExecutionsCount() int
EnqueuedExecutionsCount return number of items enqueued
func (*ExecutorBuffer) Run ¶
func (s *ExecutorBuffer) Run(ctx context.Context, localExecutionState store.LocalExecutionState) error
Run enqueues the execution and tries to run it if there is enough capacity.
func (*ExecutorBuffer) RunningExecutions ¶
func (s *ExecutorBuffer) RunningExecutions() []store.LocalExecutionState
RunningExecutions return list of running executions
type ExecutorBufferParams ¶
type InputCleanupFn ¶ added in v1.0.4
InputCleanupFn is a function type that defines the contract for cleaning up resources associated with input volume data after the job execution has either completed or failed to start. The function is expected to take a context.Context as an argument, which can be used for timeout and cancellation signals. It returns an error if the cleanup operation fails.
For example, an InputCleanupFn might be responsible for deallocating storage used for input volumes, or deleting temporary input files that were created as part of the job's execution. The nature of it operation depends on the storage provided by `strgprovider` and input sources of the jobs associated tasks. For the case of a wasm job its input and entry module storage volumes should be removed via the method after the jobs execution reaches a terminal state.
func PrepareRunArguments ¶ added in v1.0.4
func PrepareRunArguments( ctx context.Context, strgprovider storage.StorageProvider, storageDirectory string, execution *models.Execution, resultsDir string, ) (*executor.RunCommandRequest, InputCleanupFn, error)
type ManagementClient ¶ added in v1.2.3
type ManagementClient struct {
// contains filtered or unexported fields
}
ManagementClient is used to call management functions with the requester nodes, via the NATS transport. When `Start`ed it will periodically send an update to the requester node with the latest node info for this node.
func NewManagementClient ¶ added in v1.2.3
func NewManagementClient(params *ManagementClientParams) *ManagementClient
func (*ManagementClient) RegisterNode ¶ added in v1.2.3
func (m *ManagementClient) RegisterNode(ctx context.Context) error
RegisterNode sends a registration request to the requester node. If we successfully register, a sentinel file is created to indicate that we are registered. If present the requester node will know it is already registered. If not present, it will attempt to register again, expecting the requester node to gracefully handle any previous registrations.
func (*ManagementClient) Start ¶ added in v1.2.3
func (m *ManagementClient) Start(ctx context.Context)
func (*ManagementClient) Stop ¶ added in v1.2.3
func (m *ManagementClient) Stop()
type ManagementClientParams ¶ added in v1.2.3
type ManagementClientParams struct { NodeID string LabelsProvider models.LabelsProvider ManagementProxy ManagementEndpoint NodeInfoDecorator models.NodeInfoDecorator AvailableCapacityTracker capacity.Tracker QueueUsageTracker capacity.UsageTracker RegistrationFilePath string HeartbeatClient heartbeat.Client ControlPlaneSettings types.ComputeControlPlaneConfig }
type ManagementEndpoint ¶ added in v1.2.3
type ManagementEndpoint interface { // Register registers a compute node with the requester node. Register(context.Context, requests.RegisterRequest) (*requests.RegisterResponse, error) // UpdateInfo sends an update of node info to the requester node UpdateInfo(context.Context, requests.UpdateInfoRequest) (*requests.UpdateInfoResponse, error) // UpdateResources updates the resources currently in use by a specific node UpdateResources(context.Context, requests.UpdateResourcesRequest) (*requests.UpdateResourcesResponse, error) }
ManagementEndpoint is the transport-based interface for compute nodes to register with the requester node, update information and perform heartbeats.
type MockCallback ¶ added in v1.0.0
type MockCallback struct {
// contains filtered or unexported fields
}
MockCallback is a mock of Callback interface.
func NewMockCallback ¶ added in v1.0.4
func NewMockCallback(ctrl *gomock.Controller) *MockCallback
NewMockCallback creates a new mock instance.
func (*MockCallback) EXPECT ¶ added in v1.0.4
func (m *MockCallback) EXPECT() *MockCallbackMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCallback) OnBidComplete ¶ added in v1.0.0
func (m *MockCallback) OnBidComplete(ctx context.Context, result BidResult)
OnBidComplete mocks base method.
func (*MockCallback) OnCancelComplete ¶ added in v1.0.0
func (m *MockCallback) OnCancelComplete(ctx context.Context, result CancelResult)
OnCancelComplete mocks base method.
func (*MockCallback) OnComputeFailure ¶ added in v1.0.0
func (m *MockCallback) OnComputeFailure(ctx context.Context, err ComputeError)
OnComputeFailure mocks base method.
func (*MockCallback) OnRunComplete ¶ added in v1.0.0
func (m *MockCallback) OnRunComplete(ctx context.Context, result RunResult)
OnRunComplete mocks base method.
type MockCallbackMockRecorder ¶ added in v1.0.4
type MockCallbackMockRecorder struct {
// contains filtered or unexported fields
}
MockCallbackMockRecorder is the mock recorder for MockCallback.
func (*MockCallbackMockRecorder) OnBidComplete ¶ added in v1.0.4
func (mr *MockCallbackMockRecorder) OnBidComplete(ctx, result any) *gomock.Call
OnBidComplete indicates an expected call of OnBidComplete.
func (*MockCallbackMockRecorder) OnCancelComplete ¶ added in v1.0.4
func (mr *MockCallbackMockRecorder) OnCancelComplete(ctx, result any) *gomock.Call
OnCancelComplete indicates an expected call of OnCancelComplete.
func (*MockCallbackMockRecorder) OnComputeFailure ¶ added in v1.0.4
func (mr *MockCallbackMockRecorder) OnComputeFailure(ctx, err any) *gomock.Call
OnComputeFailure indicates an expected call of OnComputeFailure.
func (*MockCallbackMockRecorder) OnRunComplete ¶ added in v1.0.4
func (mr *MockCallbackMockRecorder) OnRunComplete(ctx, result any) *gomock.Call
OnRunComplete indicates an expected call of OnRunComplete.
type MockEndpoint ¶ added in v1.0.4
type MockEndpoint struct {
// contains filtered or unexported fields
}
MockEndpoint is a mock of Endpoint interface.
func NewMockEndpoint ¶ added in v1.0.4
func NewMockEndpoint(ctrl *gomock.Controller) *MockEndpoint
NewMockEndpoint creates a new mock instance.
func (*MockEndpoint) AskForBid ¶ added in v1.0.4
func (m *MockEndpoint) AskForBid(arg0 context.Context, arg1 AskForBidRequest) (AskForBidResponse, error)
AskForBid mocks base method.
func (*MockEndpoint) BidAccepted ¶ added in v1.0.4
func (m *MockEndpoint) BidAccepted(arg0 context.Context, arg1 BidAcceptedRequest) (BidAcceptedResponse, error)
BidAccepted mocks base method.
func (*MockEndpoint) BidRejected ¶ added in v1.0.4
func (m *MockEndpoint) BidRejected(arg0 context.Context, arg1 BidRejectedRequest) (BidRejectedResponse, error)
BidRejected mocks base method.
func (*MockEndpoint) CancelExecution ¶ added in v1.0.4
func (m *MockEndpoint) CancelExecution(arg0 context.Context, arg1 CancelExecutionRequest) (CancelExecutionResponse, error)
CancelExecution mocks base method.
func (*MockEndpoint) EXPECT ¶ added in v1.0.4
func (m *MockEndpoint) EXPECT() *MockEndpointMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEndpoint) ExecutionLogs ¶ added in v1.0.4
func (m *MockEndpoint) ExecutionLogs(ctx context.Context, request ExecutionLogsRequest) (<-chan *concurrency.AsyncResult[models.ExecutionLog], error)
ExecutionLogs mocks base method.
type MockEndpointMockRecorder ¶ added in v1.0.4
type MockEndpointMockRecorder struct {
// contains filtered or unexported fields
}
MockEndpointMockRecorder is the mock recorder for MockEndpoint.
func (*MockEndpointMockRecorder) AskForBid ¶ added in v1.0.4
func (mr *MockEndpointMockRecorder) AskForBid(arg0, arg1 any) *gomock.Call
AskForBid indicates an expected call of AskForBid.
func (*MockEndpointMockRecorder) BidAccepted ¶ added in v1.0.4
func (mr *MockEndpointMockRecorder) BidAccepted(arg0, arg1 any) *gomock.Call
BidAccepted indicates an expected call of BidAccepted.
func (*MockEndpointMockRecorder) BidRejected ¶ added in v1.0.4
func (mr *MockEndpointMockRecorder) BidRejected(arg0, arg1 any) *gomock.Call
BidRejected indicates an expected call of BidRejected.
func (*MockEndpointMockRecorder) CancelExecution ¶ added in v1.0.4
func (mr *MockEndpointMockRecorder) CancelExecution(arg0, arg1 any) *gomock.Call
CancelExecution indicates an expected call of CancelExecution.
func (*MockEndpointMockRecorder) ExecutionLogs ¶ added in v1.0.4
func (mr *MockEndpointMockRecorder) ExecutionLogs(ctx, request any) *gomock.Call
ExecutionLogs indicates an expected call of ExecutionLogs.
type MockExecutor ¶ added in v1.0.4
type MockExecutor struct {
// contains filtered or unexported fields
}
MockExecutor is a mock of Executor interface.
func NewMockExecutor ¶ added in v1.0.4
func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor
NewMockExecutor creates a new mock instance.
func (*MockExecutor) Cancel ¶ added in v1.0.4
func (m *MockExecutor) Cancel(ctx context.Context, localExecutionState store.LocalExecutionState) error
Cancel mocks base method.
func (*MockExecutor) EXPECT ¶ added in v1.0.4
func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockExecutor) Run ¶ added in v1.0.4
func (m *MockExecutor) Run(ctx context.Context, localExecutionState store.LocalExecutionState) error
Run mocks base method.
type MockExecutorMockRecorder ¶ added in v1.0.4
type MockExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockExecutorMockRecorder is the mock recorder for MockExecutor.
type MockManagementEndpoint ¶ added in v1.3.1
type MockManagementEndpoint struct {
// contains filtered or unexported fields
}
MockManagementEndpoint is a mock of ManagementEndpoint interface.
func NewMockManagementEndpoint ¶ added in v1.3.1
func NewMockManagementEndpoint(ctrl *gomock.Controller) *MockManagementEndpoint
NewMockManagementEndpoint creates a new mock instance.
func (*MockManagementEndpoint) EXPECT ¶ added in v1.3.1
func (m *MockManagementEndpoint) EXPECT() *MockManagementEndpointMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManagementEndpoint) Register ¶ added in v1.3.1
func (m *MockManagementEndpoint) Register(arg0 context.Context, arg1 requests.RegisterRequest) (*requests.RegisterResponse, error)
Register mocks base method.
func (*MockManagementEndpoint) UpdateInfo ¶ added in v1.3.1
func (m *MockManagementEndpoint) UpdateInfo(arg0 context.Context, arg1 requests.UpdateInfoRequest) (*requests.UpdateInfoResponse, error)
UpdateInfo mocks base method.
func (*MockManagementEndpoint) UpdateResources ¶ added in v1.3.1
func (m *MockManagementEndpoint) UpdateResources(arg0 context.Context, arg1 requests.UpdateResourcesRequest) (*requests.UpdateResourcesResponse, error)
UpdateResources mocks base method.
type MockManagementEndpointMockRecorder ¶ added in v1.3.1
type MockManagementEndpointMockRecorder struct {
// contains filtered or unexported fields
}
MockManagementEndpointMockRecorder is the mock recorder for MockManagementEndpoint.
func (*MockManagementEndpointMockRecorder) Register ¶ added in v1.3.1
func (mr *MockManagementEndpointMockRecorder) Register(arg0, arg1 any) *gomock.Call
Register indicates an expected call of Register.
func (*MockManagementEndpointMockRecorder) UpdateInfo ¶ added in v1.3.1
func (mr *MockManagementEndpointMockRecorder) UpdateInfo(arg0, arg1 any) *gomock.Call
UpdateInfo indicates an expected call of UpdateInfo.
func (*MockManagementEndpointMockRecorder) UpdateResources ¶ added in v1.3.1
func (mr *MockManagementEndpointMockRecorder) UpdateResources(arg0, arg1 any) *gomock.Call
UpdateResources indicates an expected call of UpdateResources.
type NodeInfoDecorator ¶ added in v1.2.1
type NodeInfoDecorator struct {
// contains filtered or unexported fields
}
func NewNodeInfoDecorator ¶ added in v1.2.1
func NewNodeInfoDecorator(params NodeInfoDecoratorParams) *NodeInfoDecorator
func (*NodeInfoDecorator) DecorateNodeInfo ¶ added in v1.2.1
type NodeInfoDecoratorParams ¶ added in v1.2.1
type NodeInfoDecoratorParams struct { Executors executor.ExecutorProvider Publisher publisher.PublisherProvider Storages storage.StorageProvider RunningCapacityTracker capacity.Tracker QueueCapacityTracker capacity.UsageTracker ExecutorBuffer *ExecutorBuffer MaxJobRequirements models.Resources }
type RegistrationFile ¶ added in v1.2.3
type RegistrationFile struct {
// contains filtered or unexported fields
}
RegistrationFile is a sentinel on disk whose presence is used to denote that a node has successfully registered with the requester. This file is per-node to allow multiple compute nodes using the same shared directory for config.
func NewRegistrationFile ¶ added in v1.2.3
func NewRegistrationFile(path string) *RegistrationFile
func (*RegistrationFile) Exists ¶ added in v1.2.3
func (r *RegistrationFile) Exists() bool
func (*RegistrationFile) Set ¶ added in v1.2.3
func (r *RegistrationFile) Set() error
type ResultsPath ¶ added in v1.0.4
type ResultsPath struct { // where do we copy the results from jobs temporarily? ResultsDir string }
func NewResultsPath ¶ added in v1.0.4
func NewResultsPath() (*ResultsPath, error)
func (*ResultsPath) Close ¶ added in v1.0.4
func (results *ResultsPath) Close() error
func (*ResultsPath) EnsureResultsDir ¶ added in v1.0.4
func (results *ResultsPath) EnsureResultsDir(executionID string) (string, error)
EnsureResultsDir ensures that the results directory exists.
func (*ResultsPath) PrepareResultsDir ¶ added in v1.0.4
func (results *ResultsPath) PrepareResultsDir(executionID string) (string, error)
PrepareResultsDir creates a temporary directory to store the results of a job execution.
type RoutingMetadata ¶
type RunResult ¶
type RunResult struct { RoutingMetadata ExecutionMetadata PublishResult *models.SpecConfig RunCommandResult *models.RunCommandResult }
RunResult Result of a job execution that is returned to the caller through a Callback.
type StartResult ¶ added in v1.0.4
type StartResult struct { Err error // contains filtered or unexported fields }
type Startup ¶ added in v1.0.4
type Startup struct {
// contains filtered or unexported fields
}
func NewStartup ¶ added in v1.0.4
func NewStartup(execStore store.ExecutionStore, execBuffer Executor) *Startup