mirror of
https://github.com/temporalio/temporal.git
synced 2026-08-30 18:41:49 -07:00
## What changed? - Make all registered component key value pairs available via `chasm.Context.Value()` - Manually added key value pairs will take precedence over registered onces. - Conflict in keys will cause registration to fail ## Why? - All component logic to access registered value from parent or child components as well. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [x] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s)
167 lines
6.2 KiB
Go
167 lines
6.2 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: engine.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package chasm -source engine.go -destination engine_mock.go
|
|
//
|
|
|
|
// Package chasm is a generated GoMock package.
|
|
package chasm
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockEngine is a mock of Engine interface.
|
|
type MockEngine struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockEngineMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockEngineMockRecorder is the mock recorder for MockEngine.
|
|
type MockEngineMockRecorder struct {
|
|
mock *MockEngine
|
|
}
|
|
|
|
// NewMockEngine creates a new mock instance.
|
|
func NewMockEngine(ctrl *gomock.Controller) *MockEngine {
|
|
mock := &MockEngine{ctrl: ctrl}
|
|
mock.recorder = &MockEngineMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockEngine) EXPECT() *MockEngineMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// DeleteExecution mocks base method.
|
|
func (m *MockEngine) DeleteExecution(arg0 context.Context, arg1 ComponentRef, arg2 DeleteExecutionRequest) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "DeleteExecution", arg0, arg1, arg2)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// DeleteExecution indicates an expected call of DeleteExecution.
|
|
func (mr *MockEngineMockRecorder) DeleteExecution(arg0, arg1, arg2 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteExecution", reflect.TypeOf((*MockEngine)(nil).DeleteExecution), arg0, arg1, arg2)
|
|
}
|
|
|
|
// NotifyExecution mocks base method.
|
|
func (m *MockEngine) NotifyExecution(arg0 ExecutionKey) {
|
|
m.ctrl.T.Helper()
|
|
m.ctrl.Call(m, "NotifyExecution", arg0)
|
|
}
|
|
|
|
// NotifyExecution indicates an expected call of NotifyExecution.
|
|
func (mr *MockEngineMockRecorder) NotifyExecution(arg0 any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyExecution", reflect.TypeOf((*MockEngine)(nil).NotifyExecution), arg0)
|
|
}
|
|
|
|
// PollComponent mocks base method.
|
|
func (m *MockEngine) PollComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(Context, Component) (bool, error), arg3 ...TransitionOption) ([]byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "PollComponent", varargs...)
|
|
ret0, _ := ret[0].([]byte)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// PollComponent indicates an expected call of PollComponent.
|
|
func (mr *MockEngineMockRecorder) PollComponent(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollComponent", reflect.TypeOf((*MockEngine)(nil).PollComponent), varargs...)
|
|
}
|
|
|
|
// ReadComponent mocks base method.
|
|
func (m *MockEngine) ReadComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(Context, Component) error, arg3 ...TransitionOption) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "ReadComponent", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// ReadComponent indicates an expected call of ReadComponent.
|
|
func (mr *MockEngineMockRecorder) ReadComponent(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadComponent", reflect.TypeOf((*MockEngine)(nil).ReadComponent), varargs...)
|
|
}
|
|
|
|
// StartExecution mocks base method.
|
|
func (m *MockEngine) StartExecution(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext) (RootComponent, error), arg3 ...TransitionOption) (StartExecutionResult, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "StartExecution", varargs...)
|
|
ret0, _ := ret[0].(StartExecutionResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// StartExecution indicates an expected call of StartExecution.
|
|
func (mr *MockEngineMockRecorder) StartExecution(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartExecution", reflect.TypeOf((*MockEngine)(nil).StartExecution), varargs...)
|
|
}
|
|
|
|
// UpdateComponent mocks base method.
|
|
func (m *MockEngine) UpdateComponent(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext, Component) error, arg3 ...TransitionOption) ([]byte, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2}
|
|
for _, a := range arg3 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "UpdateComponent", varargs...)
|
|
ret0, _ := ret[0].([]byte)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UpdateComponent indicates an expected call of UpdateComponent.
|
|
func (mr *MockEngineMockRecorder) UpdateComponent(arg0, arg1, arg2 any, arg3 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2}, arg3...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateComponent", reflect.TypeOf((*MockEngine)(nil).UpdateComponent), varargs...)
|
|
}
|
|
|
|
// UpdateWithStartExecution mocks base method.
|
|
func (m *MockEngine) UpdateWithStartExecution(arg0 context.Context, arg1 ComponentRef, arg2 func(MutableContext) (RootComponent, error), arg3 func(MutableContext, Component) error, arg4 ...TransitionOption) (EngineUpdateWithStartExecutionResult, error) {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{arg0, arg1, arg2, arg3}
|
|
for _, a := range arg4 {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "UpdateWithStartExecution", varargs...)
|
|
ret0, _ := ret[0].(EngineUpdateWithStartExecutionResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// UpdateWithStartExecution indicates an expected call of UpdateWithStartExecution.
|
|
func (mr *MockEngineMockRecorder) UpdateWithStartExecution(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWithStartExecution", reflect.TypeOf((*MockEngine)(nil).UpdateWithStartExecution), varargs...)
|
|
}
|