Documentation ¶
Index ¶
- type CallbackProxy
- func (p *CallbackProxy) OnBidComplete(ctx context.Context, result compute.BidResult)
- func (p *CallbackProxy) OnCancelComplete(ctx context.Context, result compute.CancelResult)
- func (p *CallbackProxy) OnComputeFailure(ctx context.Context, result compute.ComputeError)
- func (p *CallbackProxy) OnPublishComplete(ctx context.Context, result compute.PublishResult)
- func (p *CallbackProxy) OnRunComplete(ctx context.Context, result compute.RunResult)
- func (p *CallbackProxy) RegisterLocalComputeCallback(callback compute.Callback)
- type CallbackProxyParams
- type ComputeProxy
- func (p *ComputeProxy) AskForBid(ctx context.Context, request compute.AskForBidRequest) (compute.AskForBidResponse, error)
- func (p *ComputeProxy) BidAccepted(ctx context.Context, request compute.BidAcceptedRequest) (compute.BidAcceptedResponse, error)
- func (p *ComputeProxy) BidRejected(ctx context.Context, request compute.BidRejectedRequest) (compute.BidRejectedResponse, error)
- func (p *ComputeProxy) CancelExecution(ctx context.Context, request compute.CancelExecutionRequest) (compute.CancelExecutionResponse, error)
- func (p *ComputeProxy) ExecutionLogs(ctx context.Context, request compute.ExecutionLogsRequest) (compute.ExecutionLogsResponse, error)
- func (p *ComputeProxy) RegisterLocalComputeEndpoint(endpoint compute.Endpoint)
- func (p *ComputeProxy) ResultAccepted(ctx context.Context, request compute.ResultAcceptedRequest) (compute.ResultAcceptedResponse, error)
- func (p *ComputeProxy) ResultRejected(ctx context.Context, request compute.ResultRejectedRequest) (compute.ResultRejectedResponse, error)
- type ComputeProxyParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackProxy ¶
type CallbackProxy struct {
// contains filtered or unexported fields
}
CallbackProxy is a proxy for a compute.Callback that can be used to send compute callbacks to the requester node, such as when the execution is completed or when a failure occurs. The proxy can forward callbacks to a remote requester node, or locally if the node is the requester and a LocalCallback is provided.
func NewCallbackProxy ¶
func NewCallbackProxy(params CallbackProxyParams) *CallbackProxy
func (*CallbackProxy) OnBidComplete ¶ added in v0.3.26
func (p *CallbackProxy) OnBidComplete(ctx context.Context, result compute.BidResult)
func (*CallbackProxy) OnCancelComplete ¶
func (p *CallbackProxy) OnCancelComplete(ctx context.Context, result compute.CancelResult)
func (*CallbackProxy) OnComputeFailure ¶
func (p *CallbackProxy) OnComputeFailure(ctx context.Context, result compute.ComputeError)
func (*CallbackProxy) OnPublishComplete ¶
func (p *CallbackProxy) OnPublishComplete(ctx context.Context, result compute.PublishResult)
func (*CallbackProxy) OnRunComplete ¶
func (p *CallbackProxy) OnRunComplete(ctx context.Context, result compute.RunResult)
func (*CallbackProxy) RegisterLocalComputeCallback ¶
func (p *CallbackProxy) RegisterLocalComputeCallback(callback compute.Callback)
type CallbackProxyParams ¶
type ComputeProxy ¶
type ComputeProxy struct {
// contains filtered or unexported fields
}
ComputeProxy is a proxy to a compute node endpoint that will forward requests to remote compute nodes, or to a local compute node if the target peer ID is the same as the local host, and a LocalEndpoint implementation is provided.
func NewComputeProxy ¶
func NewComputeProxy(params ComputeProxyParams) *ComputeProxy
func (*ComputeProxy) AskForBid ¶
func (p *ComputeProxy) AskForBid(ctx context.Context, request compute.AskForBidRequest) (compute.AskForBidResponse, error)
func (*ComputeProxy) BidAccepted ¶
func (p *ComputeProxy) BidAccepted(ctx context.Context, request compute.BidAcceptedRequest) (compute.BidAcceptedResponse, error)
func (*ComputeProxy) BidRejected ¶
func (p *ComputeProxy) BidRejected(ctx context.Context, request compute.BidRejectedRequest) (compute.BidRejectedResponse, error)
func (*ComputeProxy) CancelExecution ¶
func (p *ComputeProxy) CancelExecution( ctx context.Context, request compute.CancelExecutionRequest) (compute.CancelExecutionResponse, error)
func (*ComputeProxy) ExecutionLogs ¶ added in v0.3.26
func (p *ComputeProxy) ExecutionLogs( ctx context.Context, request compute.ExecutionLogsRequest) (compute.ExecutionLogsResponse, error)
func (*ComputeProxy) RegisterLocalComputeEndpoint ¶
func (p *ComputeProxy) RegisterLocalComputeEndpoint(endpoint compute.Endpoint)
func (*ComputeProxy) ResultAccepted ¶
func (p *ComputeProxy) ResultAccepted(ctx context.Context, request compute.ResultAcceptedRequest) (compute.ResultAcceptedResponse, error)
func (*ComputeProxy) ResultRejected ¶
func (p *ComputeProxy) ResultRejected(ctx context.Context, request compute.ResultRejectedRequest) (compute.ResultRejectedResponse, error)
Click to show internal directories.
Click to hide internal directories.