requester

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package requester is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	JobsSubmitted = lo.Must(telemetry.NewCounter(
		requesterMeter,
		"job_submitted",
		"Number of jobs submitted"))
)

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) SubmitJob

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

type BaseEndpointParams

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

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)
}

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) 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 any) *gomock.Call

CancelJob indicates an expected call of CancelJob.

func (*MockEndpointMockRecorder) SubmitJob added in v1.0.4

func (mr *MockEndpointMockRecorder) SubmitJob(arg0, arg1 any) *gomock.Call

SubmitJob indicates an expected call of SubmitJob.

type ReadLogsRequest added in v0.3.26

type ReadLogsRequest struct {
	JobID       string
	ExecutionID string
	Tail        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