mockmetascheduler

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaScheduler

type MetaScheduler struct {
	mock.Mock
}

MetaScheduler is an autogenerated mock type for the MetaScheduler type

func NewMetaScheduler

func NewMetaScheduler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MetaScheduler

NewMetaScheduler creates a new instance of MetaScheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MetaScheduler) Claim

func (_m *MetaScheduler) Claim(ctx context.Context) error

Claim provides a mock function with given fields: ctx

func (*MetaScheduler) ClaimCancelling

func (_m *MetaScheduler) ClaimCancelling(ctx context.Context) error

ClaimCancelling provides a mock function with given fields: ctx

func (*MetaScheduler) ClaimTopUp

func (_m *MetaScheduler) ClaimTopUp(ctx context.Context) error

ClaimTopUp provides a mock function with given fields: ctx

func (*MetaScheduler) EXPECT

func (_m *MetaScheduler) EXPECT() *MetaScheduler_Expecter

func (*MetaScheduler) GetJob

func (_m *MetaScheduler) GetJob(ctx context.Context, jobID [32]byte) (*metascheduler.Job, error)

GetJob provides a mock function with given fields: ctx, jobID

func (*MetaScheduler) GetJobStatus

func (_m *MetaScheduler) GetJobStatus(ctx context.Context, jobID [32]byte) (metascheduler.JobStatus, error)

GetJobStatus provides a mock function with given fields: ctx, jobID

func (*MetaScheduler) GetJobs

GetJobs provides a mock function with given fields: ctx

func (*MetaScheduler) GetOldInfo

func (_m *MetaScheduler) GetOldInfo(ctx context.Context) (*metaschedulerabi.Provider, error)

GetOldInfo provides a mock function with given fields: ctx

func (*MetaScheduler) GetProviderAddress

func (_m *MetaScheduler) GetProviderAddress() common.Address

GetProviderAddress provides a mock function with given fields:

func (*MetaScheduler) IsRequestNewJobEnabled added in v0.12.10

func (_m *MetaScheduler) IsRequestNewJobEnabled(ctx context.Context) (bool, error)

IsRequestNewJobEnabled provides a mock function with given fields: ctx

func (*MetaScheduler) RefuseJob

func (_m *MetaScheduler) RefuseJob(ctx context.Context, jobID [32]byte) error

RefuseJob provides a mock function with given fields: ctx, jobID

func (*MetaScheduler) Register

Register provides a mock function with given fields: ctx, hardware, prices, labels

func (*MetaScheduler) SetJobStatus

func (_m *MetaScheduler) SetJobStatus(ctx context.Context, jobID [32]byte, status metascheduler.JobStatus, jobDurationMinute uint64, opts ...metascheduler.SetJobStatusOption) error

SetJobStatus provides a mock function with given fields: ctx, jobID, status, jobDurationMinute, opts

func (*MetaScheduler) WatchEvents

func (_m *MetaScheduler) WatchEvents(ctx context.Context, claimNextTopUpJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimNextTopUpJobEvent, claimNextCancellingJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimNextCancellingJobEvent, claimJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimJobEvent) (event.Subscription, error)

WatchEvents provides a mock function with given fields: ctx, claimNextTopUpJobEvents, claimNextCancellingJobEvents, claimJobEvents

type MetaScheduler_ClaimCancelling_Call

type MetaScheduler_ClaimCancelling_Call struct {
	*mock.Call
}

MetaScheduler_ClaimCancelling_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClaimCancelling'

func (*MetaScheduler_ClaimCancelling_Call) Return

func (*MetaScheduler_ClaimCancelling_Call) Run

func (*MetaScheduler_ClaimCancelling_Call) RunAndReturn

type MetaScheduler_ClaimTopUp_Call

type MetaScheduler_ClaimTopUp_Call struct {
	*mock.Call
}

MetaScheduler_ClaimTopUp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClaimTopUp'

func (*MetaScheduler_ClaimTopUp_Call) Return

func (*MetaScheduler_ClaimTopUp_Call) Run

func (*MetaScheduler_ClaimTopUp_Call) RunAndReturn

type MetaScheduler_Claim_Call

type MetaScheduler_Claim_Call struct {
	*mock.Call
}

MetaScheduler_Claim_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Claim'

func (*MetaScheduler_Claim_Call) Return

func (*MetaScheduler_Claim_Call) Run

func (*MetaScheduler_Claim_Call) RunAndReturn

type MetaScheduler_Expecter

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

func (*MetaScheduler_Expecter) Claim

func (_e *MetaScheduler_Expecter) Claim(ctx interface{}) *MetaScheduler_Claim_Call

Claim is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) ClaimCancelling

func (_e *MetaScheduler_Expecter) ClaimCancelling(ctx interface{}) *MetaScheduler_ClaimCancelling_Call

ClaimCancelling is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) ClaimTopUp

func (_e *MetaScheduler_Expecter) ClaimTopUp(ctx interface{}) *MetaScheduler_ClaimTopUp_Call

ClaimTopUp is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) GetJob

func (_e *MetaScheduler_Expecter) GetJob(ctx interface{}, jobID interface{}) *MetaScheduler_GetJob_Call

GetJob is a helper method to define mock.On call

  • ctx context.Context
  • jobID [32]byte

func (*MetaScheduler_Expecter) GetJobStatus

func (_e *MetaScheduler_Expecter) GetJobStatus(ctx interface{}, jobID interface{}) *MetaScheduler_GetJobStatus_Call

GetJobStatus is a helper method to define mock.On call

  • ctx context.Context
  • jobID [32]byte

func (*MetaScheduler_Expecter) GetJobs

func (_e *MetaScheduler_Expecter) GetJobs(ctx interface{}) *MetaScheduler_GetJobs_Call

GetJobs is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) GetOldInfo

func (_e *MetaScheduler_Expecter) GetOldInfo(ctx interface{}) *MetaScheduler_GetOldInfo_Call

GetOldInfo is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) GetProviderAddress

GetProviderAddress is a helper method to define mock.On call

func (*MetaScheduler_Expecter) IsRequestNewJobEnabled added in v0.12.10

func (_e *MetaScheduler_Expecter) IsRequestNewJobEnabled(ctx interface{}) *MetaScheduler_IsRequestNewJobEnabled_Call

IsRequestNewJobEnabled is a helper method to define mock.On call

  • ctx context.Context

func (*MetaScheduler_Expecter) RefuseJob

func (_e *MetaScheduler_Expecter) RefuseJob(ctx interface{}, jobID interface{}) *MetaScheduler_RefuseJob_Call

RefuseJob is a helper method to define mock.On call

  • ctx context.Context
  • jobID [32]byte

func (*MetaScheduler_Expecter) Register

func (_e *MetaScheduler_Expecter) Register(ctx interface{}, hardware interface{}, prices interface{}, labels interface{}) *MetaScheduler_Register_Call

Register is a helper method to define mock.On call

  • ctx context.Context
  • hardware metaschedulerabi.ProviderHardware
  • prices metaschedulerabi.ProviderPrices
  • labels []metaschedulerabi.Label

func (*MetaScheduler_Expecter) SetJobStatus

func (_e *MetaScheduler_Expecter) SetJobStatus(ctx interface{}, jobID interface{}, status interface{}, jobDurationMinute interface{}, opts ...interface{}) *MetaScheduler_SetJobStatus_Call

SetJobStatus is a helper method to define mock.On call

  • ctx context.Context
  • jobID [32]byte
  • status metascheduler.JobStatus
  • jobDurationMinute uint64
  • opts ...metascheduler.SetJobStatusOption

func (*MetaScheduler_Expecter) WatchEvents

func (_e *MetaScheduler_Expecter) WatchEvents(ctx interface{}, claimNextTopUpJobEvents interface{}, claimNextCancellingJobEvents interface{}, claimJobEvents interface{}) *MetaScheduler_WatchEvents_Call

WatchEvents is a helper method to define mock.On call

  • ctx context.Context
  • claimNextTopUpJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimNextTopUpJobEvent
  • claimNextCancellingJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimNextCancellingJobEvent
  • claimJobEvents chan<- *metaschedulerabi.MetaSchedulerClaimJobEvent

type MetaScheduler_GetJobStatus_Call

type MetaScheduler_GetJobStatus_Call struct {
	*mock.Call
}

MetaScheduler_GetJobStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobStatus'

func (*MetaScheduler_GetJobStatus_Call) Return

func (*MetaScheduler_GetJobStatus_Call) Run

func (*MetaScheduler_GetJobStatus_Call) RunAndReturn

type MetaScheduler_GetJob_Call

type MetaScheduler_GetJob_Call struct {
	*mock.Call
}

MetaScheduler_GetJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJob'

func (*MetaScheduler_GetJob_Call) Return

func (*MetaScheduler_GetJob_Call) Run

func (_c *MetaScheduler_GetJob_Call) Run(run func(ctx context.Context, jobID [32]byte)) *MetaScheduler_GetJob_Call

func (*MetaScheduler_GetJob_Call) RunAndReturn

type MetaScheduler_GetJobs_Call

type MetaScheduler_GetJobs_Call struct {
	*mock.Call
}

MetaScheduler_GetJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobs'

func (*MetaScheduler_GetJobs_Call) Return

func (*MetaScheduler_GetJobs_Call) Run

func (*MetaScheduler_GetJobs_Call) RunAndReturn

type MetaScheduler_GetOldInfo_Call

type MetaScheduler_GetOldInfo_Call struct {
	*mock.Call
}

MetaScheduler_GetOldInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOldInfo'

func (*MetaScheduler_GetOldInfo_Call) Return

func (*MetaScheduler_GetOldInfo_Call) Run

func (*MetaScheduler_GetOldInfo_Call) RunAndReturn

type MetaScheduler_GetProviderAddress_Call

type MetaScheduler_GetProviderAddress_Call struct {
	*mock.Call
}

MetaScheduler_GetProviderAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetProviderAddress'

func (*MetaScheduler_GetProviderAddress_Call) Return

func (*MetaScheduler_GetProviderAddress_Call) Run

func (*MetaScheduler_GetProviderAddress_Call) RunAndReturn

type MetaScheduler_IsRequestNewJobEnabled_Call added in v0.12.10

type MetaScheduler_IsRequestNewJobEnabled_Call struct {
	*mock.Call
}

MetaScheduler_IsRequestNewJobEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRequestNewJobEnabled'

func (*MetaScheduler_IsRequestNewJobEnabled_Call) Return added in v0.12.10

func (*MetaScheduler_IsRequestNewJobEnabled_Call) Run added in v0.12.10

func (*MetaScheduler_IsRequestNewJobEnabled_Call) RunAndReturn added in v0.12.10

type MetaScheduler_RefuseJob_Call

type MetaScheduler_RefuseJob_Call struct {
	*mock.Call
}

MetaScheduler_RefuseJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefuseJob'

func (*MetaScheduler_RefuseJob_Call) Return

func (*MetaScheduler_RefuseJob_Call) Run

func (*MetaScheduler_RefuseJob_Call) RunAndReturn

type MetaScheduler_Register_Call

type MetaScheduler_Register_Call struct {
	*mock.Call
}

MetaScheduler_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register'

func (*MetaScheduler_Register_Call) Return

func (*MetaScheduler_Register_Call) Run

type MetaScheduler_SetJobStatus_Call

type MetaScheduler_SetJobStatus_Call struct {
	*mock.Call
}

MetaScheduler_SetJobStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetJobStatus'

func (*MetaScheduler_SetJobStatus_Call) Return

func (*MetaScheduler_SetJobStatus_Call) Run

type MetaScheduler_WatchEvents_Call

type MetaScheduler_WatchEvents_Call struct {
	*mock.Call
}

MetaScheduler_WatchEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchEvents'

func (*MetaScheduler_WatchEvents_Call) Return

func (*MetaScheduler_WatchEvents_Call) Run

Jump to

Keyboard shortcuts

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