requester

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package requester is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEndpoint

type BaseEndpoint struct {
	// contains filtered or unexported fields
}

BaseEndpoint base implementation of requester Endpoint

func NewBaseEndpoint

func NewBaseEndpoint(params *BaseEndpointParams) *BaseEndpoint

func (*BaseEndpoint) CancelJob

func (e *BaseEndpoint) CancelJob(ctx context.Context, request CancelJobRequest) (CancelJobResult, error)

func (*BaseEndpoint) OnBidComplete added in v1.0.4

func (e *BaseEndpoint) OnBidComplete(ctx context.Context, response compute.BidResult)

OnBidComplete implements compute.Callback

func (*BaseEndpoint) OnCancelComplete added in v1.0.4

func (e *BaseEndpoint) OnCancelComplete(ctx context.Context, result compute.CancelResult)

func (*BaseEndpoint) OnComputeFailure added in v1.0.4

func (e *BaseEndpoint) OnComputeFailure(ctx context.Context, result compute.ComputeError)

func (*BaseEndpoint) OnRunComplete added in v1.0.4

func (e *BaseEndpoint) OnRunComplete(ctx context.Context, result compute.RunResult)

func (*BaseEndpoint) ReadLogs added in v0.3.26

func (e *BaseEndpoint) ReadLogs(ctx context.Context, request ReadLogsRequest) (ReadLogsResponse, error)

func (*BaseEndpoint) SubmitJob

func (e *BaseEndpoint) SubmitJob(ctx context.Context, data model.JobCreatePayload) (*model.Job, error)

type BaseEndpointParams

type BaseEndpointParams struct {
	ID                         string
	PublicKey                  []byte
	EvaluationBroker           orchestrator.EvaluationBroker
	Store                      jobstore.Store
	EventEmitter               orchestrator.EventEmitter
	ComputeEndpoint            compute.Endpoint
	StorageProviders           storage.StorageProvider
	MinJobExecutionTimeout     time.Duration
	DefaultJobExecutionTimeout time.Duration
}

type CancelJobRequest

type CancelJobRequest struct {
	JobID         string
	Reason        string
	UserTriggered bool
}

type CancelJobResult

type CancelJobResult struct{}

type Endpoint

type Endpoint interface {
	// SubmitJob submits a new job to the network.
	SubmitJob(context.Context, model.JobCreatePayload) (*model.Job, error)
	// CancelJob cancels an existing job.
	CancelJob(context.Context, CancelJobRequest) (CancelJobResult, error)
	// ReadLogs retrieves the logs for an execution
	ReadLogs(context.Context, ReadLogsRequest) (ReadLogsResponse, error)
}

Endpoint is the frontend and entry point to the requester node for the end users to submit, update and cancel jobs.

type Housekeeping

type Housekeeping struct {
	// contains filtered or unexported fields
}

func NewHousekeeping

func NewHousekeeping(params HousekeepingParams) *Housekeeping

func (*Housekeeping) Stop

func (h *Housekeeping) Stop()

type HousekeepingParams

type HousekeepingParams struct {
	Endpoint Endpoint
	JobStore jobstore.Store
	NodeID   string
	Interval time.Duration
}

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) CancelJob added in v1.0.4

func (m *MockEndpoint) CancelJob(arg0 context.Context, arg1 CancelJobRequest) (CancelJobResult, error)

CancelJob mocks base method.

func (*MockEndpoint) EXPECT added in v1.0.4

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEndpoint) ReadLogs added in v1.0.4

ReadLogs mocks base method.

func (*MockEndpoint) SubmitJob added in v1.0.4

func (m *MockEndpoint) SubmitJob(arg0 context.Context, arg1 model.JobCreatePayload) (*model.Job, error)

SubmitJob 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) CancelJob added in v1.0.4

func (mr *MockEndpointMockRecorder) CancelJob(arg0, arg1 interface{}) *gomock.Call

CancelJob indicates an expected call of CancelJob.

func (*MockEndpointMockRecorder) ReadLogs added in v1.0.4

func (mr *MockEndpointMockRecorder) ReadLogs(arg0, arg1 interface{}) *gomock.Call

ReadLogs indicates an expected call of ReadLogs.

func (*MockEndpointMockRecorder) SubmitJob added in v1.0.4

func (mr *MockEndpointMockRecorder) SubmitJob(arg0, arg1 interface{}) *gomock.Call

SubmitJob indicates an expected call of SubmitJob.

type ReadLogsRequest added in v0.3.26

type ReadLogsRequest struct {
	JobID       string
	ExecutionID string
	WithHistory bool
	Follow      bool
}

type ReadLogsResponse added in v0.3.26

type ReadLogsResponse struct {
	Address           string
	ExecutionComplete bool
}

type StartJobRequest

type StartJobRequest struct {
	Job model.Job
}

StartJobRequest triggers the scheduling of a job.

Directories

Path Synopsis
pubsub

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL