mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.
## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
258 lines
11 KiB
Go
258 lines
11 KiB
Go
// Code generated by gowrap. DO NOT EDIT.
|
|
// template: gowrap_template
|
|
// gowrap: http://github.com/hexdigest/gowrap
|
|
|
|
package faultinjection
|
|
|
|
//go:generate gowrap gen -p go.temporal.io/server/common/persistence -i ExecutionStore -t gowrap_template -o execution_store_gen.go -l ""
|
|
|
|
import (
|
|
"context"
|
|
|
|
_sourcePersistence "go.temporal.io/server/common/persistence"
|
|
)
|
|
|
|
type (
|
|
// faultInjectionExecutionStore implements ExecutionStore interface with fault injection.
|
|
faultInjectionExecutionStore struct {
|
|
_sourcePersistence.ExecutionStore
|
|
generator faultGenerator
|
|
}
|
|
)
|
|
|
|
// newFaultInjectionExecutionStore returns faultInjectionExecutionStore.
|
|
func newFaultInjectionExecutionStore(
|
|
baseStore _sourcePersistence.ExecutionStore,
|
|
generator faultGenerator,
|
|
) *faultInjectionExecutionStore {
|
|
return &faultInjectionExecutionStore{
|
|
ExecutionStore: baseStore,
|
|
generator: generator,
|
|
}
|
|
}
|
|
|
|
// AddHistoryTasks wraps ExecutionStore.AddHistoryTasks.
|
|
func (d faultInjectionExecutionStore) AddHistoryTasks(ctx context.Context, request *_sourcePersistence.InternalAddHistoryTasksRequest) (err error) {
|
|
err = d.generator.generate("AddHistoryTasks").inject(func() error {
|
|
err = d.ExecutionStore.AddHistoryTasks(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// AppendHistoryNodes wraps ExecutionStore.AppendHistoryNodes.
|
|
func (d faultInjectionExecutionStore) AppendHistoryNodes(ctx context.Context, request *_sourcePersistence.InternalAppendHistoryNodesRequest) (err error) {
|
|
err = d.generator.generate("AppendHistoryNodes").inject(func() error {
|
|
err = d.ExecutionStore.AppendHistoryNodes(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// CompleteHistoryTask wraps ExecutionStore.CompleteHistoryTask.
|
|
func (d faultInjectionExecutionStore) CompleteHistoryTask(ctx context.Context, request *_sourcePersistence.CompleteHistoryTaskRequest) (err error) {
|
|
err = d.generator.generate("CompleteHistoryTask").inject(func() error {
|
|
err = d.ExecutionStore.CompleteHistoryTask(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// ConflictResolveWorkflowExecution wraps ExecutionStore.ConflictResolveWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) ConflictResolveWorkflowExecution(ctx context.Context, request *_sourcePersistence.InternalConflictResolveWorkflowExecutionRequest) (err error) {
|
|
err = d.generator.generate("ConflictResolveWorkflowExecution").inject(func() error {
|
|
err = d.ExecutionStore.ConflictResolveWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// CreateWorkflowExecution wraps ExecutionStore.CreateWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) CreateWorkflowExecution(ctx context.Context, request *_sourcePersistence.InternalCreateWorkflowExecutionRequest) (ip1 *_sourcePersistence.InternalCreateWorkflowExecutionResponse, err error) {
|
|
err = d.generator.generate("CreateWorkflowExecution").inject(func() error {
|
|
ip1, err = d.ExecutionStore.CreateWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteCurrentWorkflowExecution wraps ExecutionStore.DeleteCurrentWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) DeleteCurrentWorkflowExecution(ctx context.Context, request *_sourcePersistence.DeleteCurrentWorkflowExecutionRequest) (err error) {
|
|
err = d.generator.generate("DeleteCurrentWorkflowExecution").inject(func() error {
|
|
err = d.ExecutionStore.DeleteCurrentWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteHistoryBranch wraps ExecutionStore.DeleteHistoryBranch.
|
|
func (d faultInjectionExecutionStore) DeleteHistoryBranch(ctx context.Context, request *_sourcePersistence.InternalDeleteHistoryBranchRequest) (err error) {
|
|
err = d.generator.generate("DeleteHistoryBranch").inject(func() error {
|
|
err = d.ExecutionStore.DeleteHistoryBranch(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteHistoryNodes wraps ExecutionStore.DeleteHistoryNodes.
|
|
func (d faultInjectionExecutionStore) DeleteHistoryNodes(ctx context.Context, request *_sourcePersistence.InternalDeleteHistoryNodesRequest) (err error) {
|
|
err = d.generator.generate("DeleteHistoryNodes").inject(func() error {
|
|
err = d.ExecutionStore.DeleteHistoryNodes(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteReplicationTaskFromDLQ wraps ExecutionStore.DeleteReplicationTaskFromDLQ.
|
|
func (d faultInjectionExecutionStore) DeleteReplicationTaskFromDLQ(ctx context.Context, request *_sourcePersistence.DeleteReplicationTaskFromDLQRequest) (err error) {
|
|
err = d.generator.generate("DeleteReplicationTaskFromDLQ").inject(func() error {
|
|
err = d.ExecutionStore.DeleteReplicationTaskFromDLQ(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteWorkflowExecution wraps ExecutionStore.DeleteWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) DeleteWorkflowExecution(ctx context.Context, request *_sourcePersistence.DeleteWorkflowExecutionRequest) (err error) {
|
|
err = d.generator.generate("DeleteWorkflowExecution").inject(func() error {
|
|
err = d.ExecutionStore.DeleteWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// ForkHistoryBranch wraps ExecutionStore.ForkHistoryBranch.
|
|
func (d faultInjectionExecutionStore) ForkHistoryBranch(ctx context.Context, request *_sourcePersistence.InternalForkHistoryBranchRequest) (err error) {
|
|
err = d.generator.generate("ForkHistoryBranch").inject(func() error {
|
|
err = d.ExecutionStore.ForkHistoryBranch(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetAllHistoryTreeBranches wraps ExecutionStore.GetAllHistoryTreeBranches.
|
|
func (d faultInjectionExecutionStore) GetAllHistoryTreeBranches(ctx context.Context, request *_sourcePersistence.GetAllHistoryTreeBranchesRequest) (ip1 *_sourcePersistence.InternalGetAllHistoryTreeBranchesResponse, err error) {
|
|
err = d.generator.generate("GetAllHistoryTreeBranches").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetAllHistoryTreeBranches(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetCurrentExecution wraps ExecutionStore.GetCurrentExecution.
|
|
func (d faultInjectionExecutionStore) GetCurrentExecution(ctx context.Context, request *_sourcePersistence.GetCurrentExecutionRequest) (ip1 *_sourcePersistence.InternalGetCurrentExecutionResponse, err error) {
|
|
err = d.generator.generate("GetCurrentExecution").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetCurrentExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetHistoryTasks wraps ExecutionStore.GetHistoryTasks.
|
|
func (d faultInjectionExecutionStore) GetHistoryTasks(ctx context.Context, request *_sourcePersistence.GetHistoryTasksRequest) (ip1 *_sourcePersistence.InternalGetHistoryTasksResponse, err error) {
|
|
err = d.generator.generate("GetHistoryTasks").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetHistoryTasks(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetHistoryTreeContainingBranch wraps ExecutionStore.GetHistoryTreeContainingBranch.
|
|
func (d faultInjectionExecutionStore) GetHistoryTreeContainingBranch(ctx context.Context, request *_sourcePersistence.InternalGetHistoryTreeContainingBranchRequest) (ip1 *_sourcePersistence.InternalGetHistoryTreeContainingBranchResponse, err error) {
|
|
err = d.generator.generate("GetHistoryTreeContainingBranch").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetHistoryTreeContainingBranch(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetReplicationTasksFromDLQ wraps ExecutionStore.GetReplicationTasksFromDLQ.
|
|
func (d faultInjectionExecutionStore) GetReplicationTasksFromDLQ(ctx context.Context, request *_sourcePersistence.GetReplicationTasksFromDLQRequest) (ip1 *_sourcePersistence.InternalGetReplicationTasksFromDLQResponse, err error) {
|
|
err = d.generator.generate("GetReplicationTasksFromDLQ").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetReplicationTasksFromDLQ(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetWorkflowExecution wraps ExecutionStore.GetWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) GetWorkflowExecution(ctx context.Context, request *_sourcePersistence.GetWorkflowExecutionRequest) (ip1 *_sourcePersistence.InternalGetWorkflowExecutionResponse, err error) {
|
|
err = d.generator.generate("GetWorkflowExecution").inject(func() error {
|
|
ip1, err = d.ExecutionStore.GetWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// IsReplicationDLQEmpty wraps ExecutionStore.IsReplicationDLQEmpty.
|
|
func (d faultInjectionExecutionStore) IsReplicationDLQEmpty(ctx context.Context, request *_sourcePersistence.GetReplicationTasksFromDLQRequest) (b1 bool, err error) {
|
|
err = d.generator.generate("IsReplicationDLQEmpty").inject(func() error {
|
|
b1, err = d.ExecutionStore.IsReplicationDLQEmpty(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// ListConcreteExecutions wraps ExecutionStore.ListConcreteExecutions.
|
|
func (d faultInjectionExecutionStore) ListConcreteExecutions(ctx context.Context, request *_sourcePersistence.ListConcreteExecutionsRequest) (ip1 *_sourcePersistence.InternalListConcreteExecutionsResponse, err error) {
|
|
err = d.generator.generate("ListConcreteExecutions").inject(func() error {
|
|
ip1, err = d.ExecutionStore.ListConcreteExecutions(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// PutReplicationTaskToDLQ wraps ExecutionStore.PutReplicationTaskToDLQ.
|
|
func (d faultInjectionExecutionStore) PutReplicationTaskToDLQ(ctx context.Context, request *_sourcePersistence.PutReplicationTaskToDLQRequest) (err error) {
|
|
err = d.generator.generate("PutReplicationTaskToDLQ").inject(func() error {
|
|
err = d.ExecutionStore.PutReplicationTaskToDLQ(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// RangeCompleteHistoryTasks wraps ExecutionStore.RangeCompleteHistoryTasks.
|
|
func (d faultInjectionExecutionStore) RangeCompleteHistoryTasks(ctx context.Context, request *_sourcePersistence.RangeCompleteHistoryTasksRequest) (err error) {
|
|
err = d.generator.generate("RangeCompleteHistoryTasks").inject(func() error {
|
|
err = d.ExecutionStore.RangeCompleteHistoryTasks(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// RangeDeleteReplicationTaskFromDLQ wraps ExecutionStore.RangeDeleteReplicationTaskFromDLQ.
|
|
func (d faultInjectionExecutionStore) RangeDeleteReplicationTaskFromDLQ(ctx context.Context, request *_sourcePersistence.RangeDeleteReplicationTaskFromDLQRequest) (err error) {
|
|
err = d.generator.generate("RangeDeleteReplicationTaskFromDLQ").inject(func() error {
|
|
err = d.ExecutionStore.RangeDeleteReplicationTaskFromDLQ(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// ReadHistoryBranch wraps ExecutionStore.ReadHistoryBranch.
|
|
func (d faultInjectionExecutionStore) ReadHistoryBranch(ctx context.Context, request *_sourcePersistence.InternalReadHistoryBranchRequest) (ip1 *_sourcePersistence.InternalReadHistoryBranchResponse, err error) {
|
|
err = d.generator.generate("ReadHistoryBranch").inject(func() error {
|
|
ip1, err = d.ExecutionStore.ReadHistoryBranch(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// SetWorkflowExecution wraps ExecutionStore.SetWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) SetWorkflowExecution(ctx context.Context, request *_sourcePersistence.InternalSetWorkflowExecutionRequest) (err error) {
|
|
err = d.generator.generate("SetWorkflowExecution").inject(func() error {
|
|
err = d.ExecutionStore.SetWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// UpdateWorkflowExecution wraps ExecutionStore.UpdateWorkflowExecution.
|
|
func (d faultInjectionExecutionStore) UpdateWorkflowExecution(ctx context.Context, request *_sourcePersistence.InternalUpdateWorkflowExecutionRequest) (err error) {
|
|
err = d.generator.generate("UpdateWorkflowExecution").inject(func() error {
|
|
err = d.ExecutionStore.UpdateWorkflowExecution(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|