Documentation ¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- Constants
- func ValidateNewExecution(execution *models.Execution) error
- type ErrCheckpointNameBlank
- type ErrExecutionAlreadyExists
- type ErrExecutionAlreadyTerminal
- type ErrExecutionEventsNotFound
- type ErrExecutionNotFound
- type ErrExecutionsNotFoundForJob
- type ErrInvalidExecutionRevision
- type ErrInvalidExecutionState
- type ErrNilExecution
- type ExecutionStore
- type MockExecutionStore
- func (m *MockExecutionStore) AddExecutionEvent(ctx context.Context, executionID string, events ...*models.Event) error
- func (m *MockExecutionStore) BeginTx(ctx context.Context) (boltdblib.TxContext, error)
- func (m *MockExecutionStore) Close(ctx context.Context) error
- func (m *MockExecutionStore) CreateExecution(ctx context.Context, execution models.Execution, events ...*models.Event) error
- func (m *MockExecutionStore) DeleteExecution(ctx context.Context, id string) error
- func (m *MockExecutionStore) EXPECT() *MockExecutionStoreMockRecorder
- func (m *MockExecutionStore) GetEventStore() watcher.EventStore
- func (m *MockExecutionStore) GetExecution(ctx context.Context, id string) (*models.Execution, error)
- func (m *MockExecutionStore) GetExecutionCount(ctx context.Context, state models.ExecutionStateType) (uint64, error)
- func (m *MockExecutionStore) GetExecutionEvents(ctx context.Context, executionID string) ([]*models.Event, error)
- func (m *MockExecutionStore) GetExecutions(ctx context.Context, jobID string) ([]*models.Execution, error)
- func (m *MockExecutionStore) GetLiveExecutions(ctx context.Context) ([]*models.Execution, error)
- func (m *MockExecutionStore) UpdateExecutionState(ctx context.Context, request UpdateExecutionRequest) error
- type MockExecutionStoreMockRecorder
- func (mr *MockExecutionStoreMockRecorder) AddExecutionEvent(ctx, executionID interface{}, events ...interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) BeginTx(ctx interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) Close(ctx interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) CreateExecution(ctx, execution interface{}, events ...interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) DeleteExecution(ctx, id interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetEventStore() *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetExecution(ctx, id interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetExecutionCount(ctx, state interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetExecutionEvents(ctx, executionID interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetExecutions(ctx, jobID interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) GetLiveExecutions(ctx interface{}) *gomock.Call
- func (mr *MockExecutionStoreMockRecorder) UpdateExecutionState(ctx, request interface{}) *gomock.Call
- type UpdateExecutionCondition
- type UpdateExecutionRequest
Constants ¶
const (
NewExecutionMessage = "Execution created"
)
Variables ¶
This section is empty.
Functions ¶
func ValidateNewExecution ¶
Types ¶
type ErrCheckpointNameBlank ¶ added in v1.6.0
type ErrCheckpointNameBlank struct{}
ErrCheckpointNameBlank is returned when attempting to checkpoint with an empty name
func NewErrCheckpointNameBlank ¶ added in v1.6.0
func NewErrCheckpointNameBlank() ErrCheckpointNameBlank
func (ErrCheckpointNameBlank) Error ¶ added in v1.6.0
func (e ErrCheckpointNameBlank) Error() string
type ErrExecutionAlreadyExists ¶
type ErrExecutionAlreadyExists struct {
ExecutionID string
}
ErrExecutionAlreadyExists is returned when an execution already exists
func NewErrExecutionAlreadyExists ¶
func NewErrExecutionAlreadyExists(id string) ErrExecutionAlreadyExists
func (ErrExecutionAlreadyExists) Error ¶
func (e ErrExecutionAlreadyExists) Error() string
type ErrExecutionAlreadyTerminal ¶
type ErrExecutionAlreadyTerminal struct { ExecutionID string Actual models.ExecutionStateType NewState models.ExecutionStateType }
ErrExecutionAlreadyTerminal is returned when an execution is already in terminal state and cannot be updated.
func NewErrExecutionAlreadyTerminal ¶
func NewErrExecutionAlreadyTerminal( id string, actual models.ExecutionStateType, newState models.ExecutionStateType) ErrExecutionAlreadyTerminal
func (ErrExecutionAlreadyTerminal) Error ¶
func (e ErrExecutionAlreadyTerminal) Error() string
type ErrExecutionEventsNotFound ¶ added in v1.5.2
type ErrExecutionEventsNotFound struct {
ExecutionID string
}
ErrExecutionEventsNotFound is returned when the execution is not found
func NewErrExecutionEventsNotFound ¶ added in v1.5.2
func NewErrExecutionEventsNotFound(id string) ErrExecutionEventsNotFound
func (ErrExecutionEventsNotFound) Error ¶ added in v1.5.2
func (e ErrExecutionEventsNotFound) Error() string
type ErrExecutionNotFound ¶
type ErrExecutionNotFound struct {
ExecutionID string
}
ErrExecutionNotFound is returned when the execution is not found
func NewErrExecutionNotFound ¶
func NewErrExecutionNotFound(id string) ErrExecutionNotFound
func (ErrExecutionNotFound) Error ¶
func (e ErrExecutionNotFound) Error() string
type ErrExecutionsNotFoundForJob ¶ added in v0.3.24
type ErrExecutionsNotFoundForJob struct {
JobID string
}
ErrExecutionsNotFoundForJob is returned when the execution is not found for a given job
func NewErrExecutionsNotFoundForJob ¶ added in v0.3.24
func NewErrExecutionsNotFoundForJob(id string) ErrExecutionsNotFoundForJob
func (ErrExecutionsNotFoundForJob) Error ¶ added in v0.3.24
func (e ErrExecutionsNotFoundForJob) Error() string
type ErrInvalidExecutionRevision ¶ added in v1.5.0
ErrInvalidExecutionRevision is returned when an execution has an invalid revision.
func NewErrInvalidExecutionRevision ¶ added in v1.5.0
func NewErrInvalidExecutionRevision(id string, actual, expected uint64) ErrInvalidExecutionRevision
func (ErrInvalidExecutionRevision) Error ¶ added in v1.5.0
func (e ErrInvalidExecutionRevision) Error() string
type ErrInvalidExecutionState ¶
type ErrInvalidExecutionState struct { ExecutionID string Actual models.ExecutionStateType Expected []models.ExecutionStateType }
ErrInvalidExecutionState is returned when an execution is in an invalid state.
func NewErrInvalidExecutionState ¶
func NewErrInvalidExecutionState( id string, actual models.ExecutionStateType, expected ...models.ExecutionStateType) ErrInvalidExecutionState
func (ErrInvalidExecutionState) Error ¶
func (e ErrInvalidExecutionState) Error() string
type ErrNilExecution ¶
type ErrNilExecution struct{}
ErrNilExecution is returned when the execution is nil
func NewErrNilExecution ¶
func NewErrNilExecution() ErrNilExecution
func (ErrNilExecution) Error ¶
func (e ErrNilExecution) Error() string
type ExecutionStore ¶
type ExecutionStore interface { // BeginTx starts a new transaction and returns a transactional context BeginTx(ctx context.Context) (boltdblib.TxContext, error) // GetExecution returns the execution for a given id GetExecution(ctx context.Context, id string) (*models.Execution, error) // GetExecutions returns all the executions for a given job GetExecutions(ctx context.Context, jobID string) ([]*models.Execution, error) // GetLiveExecutions gets an array of the executions currently in the // active state (ExecutionStateBidAccepted) GetLiveExecutions(ctx context.Context) ([]*models.Execution, error) // AddExecutionEvent adds an event to the execution AddExecutionEvent(ctx context.Context, executionID string, events ...*models.Event) error // GetExecutionEvents returns the history of an execution GetExecutionEvents(ctx context.Context, executionID string) ([]*models.Event, error) // CreateExecution creates a new execution for a given job CreateExecution(ctx context.Context, execution models.Execution, events ...*models.Event) error // UpdateExecutionState updates the execution state UpdateExecutionState(ctx context.Context, request UpdateExecutionRequest) error // DeleteExecution deletes an execution DeleteExecution(ctx context.Context, id string) error // GetExecutionCount returns a count of all executions that are in the specified state GetExecutionCount(ctx context.Context, state models.ExecutionStateType) (uint64, error) // GetEventStore returns the event store for the execution store GetEventStore() watcher.EventStore // Checkpoint saves the last sequence number processed Checkpoint(ctx context.Context, name string, sequenceNumber uint64) error // GetCheckpoint returns the last sequence number processed GetCheckpoint(ctx context.Context, name string) (uint64, error) // Close provides the opportunity for the underlying store to cleanup // any resources as the compute node is shutting down Close(ctx context.Context) error }
ExecutionStore A metadata store of job executions handled by the current compute node
type MockExecutionStore ¶ added in v1.0.4
type MockExecutionStore struct {
// contains filtered or unexported fields
}
MockExecutionStore is a mock of ExecutionStore interface.
func NewMockExecutionStore ¶ added in v1.0.4
func NewMockExecutionStore(ctrl *gomock.Controller) *MockExecutionStore
NewMockExecutionStore creates a new mock instance.
func (*MockExecutionStore) AddExecutionEvent ¶ added in v1.5.2
func (m *MockExecutionStore) AddExecutionEvent(ctx context.Context, executionID string, events ...*models.Event) error
AddExecutionEvent mocks base method.
func (*MockExecutionStore) Close ¶ added in v1.0.4
func (m *MockExecutionStore) Close(ctx context.Context) error
Close mocks base method.
func (*MockExecutionStore) CreateExecution ¶ added in v1.0.4
func (m *MockExecutionStore) CreateExecution(ctx context.Context, execution models.Execution, events ...*models.Event) error
CreateExecution mocks base method.
func (*MockExecutionStore) DeleteExecution ¶ added in v1.0.4
func (m *MockExecutionStore) DeleteExecution(ctx context.Context, id string) error
DeleteExecution mocks base method.
func (*MockExecutionStore) EXPECT ¶ added in v1.0.4
func (m *MockExecutionStore) EXPECT() *MockExecutionStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockExecutionStore) GetEventStore ¶ added in v1.5.2
func (m *MockExecutionStore) GetEventStore() watcher.EventStore
GetEventStore mocks base method.
func (*MockExecutionStore) GetExecution ¶ added in v1.0.4
func (m *MockExecutionStore) GetExecution(ctx context.Context, id string) (*models.Execution, error)
GetExecution mocks base method.
func (*MockExecutionStore) GetExecutionCount ¶ added in v1.0.4
func (m *MockExecutionStore) GetExecutionCount(ctx context.Context, state models.ExecutionStateType) (uint64, error)
GetExecutionCount mocks base method.
func (*MockExecutionStore) GetExecutionEvents ¶ added in v1.5.2
func (m *MockExecutionStore) GetExecutionEvents(ctx context.Context, executionID string) ([]*models.Event, error)
GetExecutionEvents mocks base method.
func (*MockExecutionStore) GetExecutions ¶ added in v1.0.4
func (m *MockExecutionStore) GetExecutions(ctx context.Context, jobID string) ([]*models.Execution, error)
GetExecutions mocks base method.
func (*MockExecutionStore) GetLiveExecutions ¶ added in v1.0.4
GetLiveExecutions mocks base method.
func (*MockExecutionStore) UpdateExecutionState ¶ added in v1.0.4
func (m *MockExecutionStore) UpdateExecutionState(ctx context.Context, request UpdateExecutionRequest) error
UpdateExecutionState mocks base method.
type MockExecutionStoreMockRecorder ¶ added in v1.0.4
type MockExecutionStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockExecutionStoreMockRecorder is the mock recorder for MockExecutionStore.
func (*MockExecutionStoreMockRecorder) AddExecutionEvent ¶ added in v1.5.2
func (mr *MockExecutionStoreMockRecorder) AddExecutionEvent(ctx, executionID interface{}, events ...interface{}) *gomock.Call
AddExecutionEvent indicates an expected call of AddExecutionEvent.
func (*MockExecutionStoreMockRecorder) BeginTx ¶ added in v1.5.2
func (mr *MockExecutionStoreMockRecorder) BeginTx(ctx interface{}) *gomock.Call
BeginTx indicates an expected call of BeginTx.
func (*MockExecutionStoreMockRecorder) Close ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) Close(ctx interface{}) *gomock.Call
Close indicates an expected call of Close.
func (*MockExecutionStoreMockRecorder) CreateExecution ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) CreateExecution(ctx, execution interface{}, events ...interface{}) *gomock.Call
CreateExecution indicates an expected call of CreateExecution.
func (*MockExecutionStoreMockRecorder) DeleteExecution ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) DeleteExecution(ctx, id interface{}) *gomock.Call
DeleteExecution indicates an expected call of DeleteExecution.
func (*MockExecutionStoreMockRecorder) GetEventStore ¶ added in v1.5.2
func (mr *MockExecutionStoreMockRecorder) GetEventStore() *gomock.Call
GetEventStore indicates an expected call of GetEventStore.
func (*MockExecutionStoreMockRecorder) GetExecution ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) GetExecution(ctx, id interface{}) *gomock.Call
GetExecution indicates an expected call of GetExecution.
func (*MockExecutionStoreMockRecorder) GetExecutionCount ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) GetExecutionCount(ctx, state interface{}) *gomock.Call
GetExecutionCount indicates an expected call of GetExecutionCount.
func (*MockExecutionStoreMockRecorder) GetExecutionEvents ¶ added in v1.5.2
func (mr *MockExecutionStoreMockRecorder) GetExecutionEvents(ctx, executionID interface{}) *gomock.Call
GetExecutionEvents indicates an expected call of GetExecutionEvents.
func (*MockExecutionStoreMockRecorder) GetExecutions ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) GetExecutions(ctx, jobID interface{}) *gomock.Call
GetExecutions indicates an expected call of GetExecutions.
func (*MockExecutionStoreMockRecorder) GetLiveExecutions ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) GetLiveExecutions(ctx interface{}) *gomock.Call
GetLiveExecutions indicates an expected call of GetLiveExecutions.
func (*MockExecutionStoreMockRecorder) UpdateExecutionState ¶ added in v1.0.4
func (mr *MockExecutionStoreMockRecorder) UpdateExecutionState(ctx, request interface{}) *gomock.Call
UpdateExecutionState indicates an expected call of UpdateExecutionState.
type UpdateExecutionCondition ¶ added in v1.5.2
type UpdateExecutionCondition struct { ExpectedStates []models.ExecutionStateType ExpectedRevision uint64 UnexpectedStates []models.ExecutionStateType }