mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
Full module path rebrand from Temporal to Hanzo Tasks: - go.mod module: github.com/hanzoai/tasks - All internal Go imports updated (1906 files) - cmd/server renamed to cmd/tasksd - Binary name: tasksd (was temporal-server) - Docker images: hanzoai/tasks (was temporalio/server) - README rewritten with Hanzo Tasks branding - LLM.md created with integration notes - Makefile, goreleaser, CI workflows updated - go.temporal.io/sdk and go.temporal.io/api imports preserved (separate repos) Fork of Temporal.io (MIT license).
69 lines
2.6 KiB
Go
69 lines
2.6 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 github.com/hanzoai/tasks/common/persistence -i NexusEndpointStore -t gowrap_template -o nexus_endpoint_store_gen.go -l ""
|
|
|
|
import (
|
|
"context"
|
|
|
|
_sourcePersistence "github.com/hanzoai/tasks/common/persistence"
|
|
)
|
|
|
|
type (
|
|
// faultInjectionNexusEndpointStore implements NexusEndpointStore interface with fault injection.
|
|
faultInjectionNexusEndpointStore struct {
|
|
_sourcePersistence.NexusEndpointStore
|
|
generator faultGenerator
|
|
}
|
|
)
|
|
|
|
// newFaultInjectionNexusEndpointStore returns faultInjectionNexusEndpointStore.
|
|
func newFaultInjectionNexusEndpointStore(
|
|
baseStore _sourcePersistence.NexusEndpointStore,
|
|
generator faultGenerator,
|
|
) *faultInjectionNexusEndpointStore {
|
|
return &faultInjectionNexusEndpointStore{
|
|
NexusEndpointStore: baseStore,
|
|
generator: generator,
|
|
}
|
|
}
|
|
|
|
// CreateOrUpdateNexusEndpoint wraps NexusEndpointStore.CreateOrUpdateNexusEndpoint.
|
|
func (d faultInjectionNexusEndpointStore) CreateOrUpdateNexusEndpoint(ctx context.Context, request *_sourcePersistence.InternalCreateOrUpdateNexusEndpointRequest) (err error) {
|
|
err = d.generator.generate("CreateOrUpdateNexusEndpoint").inject(func() error {
|
|
err = d.NexusEndpointStore.CreateOrUpdateNexusEndpoint(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// DeleteNexusEndpoint wraps NexusEndpointStore.DeleteNexusEndpoint.
|
|
func (d faultInjectionNexusEndpointStore) DeleteNexusEndpoint(ctx context.Context, request *_sourcePersistence.DeleteNexusEndpointRequest) (err error) {
|
|
err = d.generator.generate("DeleteNexusEndpoint").inject(func() error {
|
|
err = d.NexusEndpointStore.DeleteNexusEndpoint(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// GetNexusEndpoint wraps NexusEndpointStore.GetNexusEndpoint.
|
|
func (d faultInjectionNexusEndpointStore) GetNexusEndpoint(ctx context.Context, request *_sourcePersistence.GetNexusEndpointRequest) (ip1 *_sourcePersistence.InternalNexusEndpoint, err error) {
|
|
err = d.generator.generate("GetNexusEndpoint").inject(func() error {
|
|
ip1, err = d.NexusEndpointStore.GetNexusEndpoint(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|
|
|
|
// ListNexusEndpoints wraps NexusEndpointStore.ListNexusEndpoints.
|
|
func (d faultInjectionNexusEndpointStore) ListNexusEndpoints(ctx context.Context, request *_sourcePersistence.ListNexusEndpointsRequest) (ip1 *_sourcePersistence.InternalListNexusEndpointsResponse, err error) {
|
|
err = d.generator.generate("ListNexusEndpoints").inject(func() error {
|
|
ip1, err = d.NexusEndpointStore.ListNexusEndpoints(ctx, request)
|
|
return err
|
|
})
|
|
return
|
|
}
|