|
| 1 | +package nexusoperation |
| 2 | + |
| 3 | +import ( |
| 4 | + "context" |
| 5 | + |
| 6 | + "go.temporal.io/api/serviceerror" |
| 7 | + "go.temporal.io/api/workflowservice/v1" |
| 8 | + "go.temporal.io/server/common/log" |
| 9 | + "go.temporal.io/server/common/namespace" |
| 10 | +) |
| 11 | + |
| 12 | +// FrontendHandler provides the frontend-facing API for standalone Nexus operations. |
| 13 | +type FrontendHandler interface { |
| 14 | + StartNexusOperationExecution(context.Context, *workflowservice.StartNexusOperationExecutionRequest) (*workflowservice.StartNexusOperationExecutionResponse, error) |
| 15 | + DescribeNexusOperationExecution(context.Context, *workflowservice.DescribeNexusOperationExecutionRequest) (*workflowservice.DescribeNexusOperationExecutionResponse, error) |
| 16 | + PollNexusOperationExecution(context.Context, *workflowservice.PollNexusOperationExecutionRequest) (*workflowservice.PollNexusOperationExecutionResponse, error) |
| 17 | + ListNexusOperationExecutions(context.Context, *workflowservice.ListNexusOperationExecutionsRequest) (*workflowservice.ListNexusOperationExecutionsResponse, error) |
| 18 | + CountNexusOperationExecutions(context.Context, *workflowservice.CountNexusOperationExecutionsRequest) (*workflowservice.CountNexusOperationExecutionsResponse, error) |
| 19 | + RequestCancelNexusOperationExecution(context.Context, *workflowservice.RequestCancelNexusOperationExecutionRequest) (*workflowservice.RequestCancelNexusOperationExecutionResponse, error) |
| 20 | + TerminateNexusOperationExecution(context.Context, *workflowservice.TerminateNexusOperationExecutionRequest) (*workflowservice.TerminateNexusOperationExecutionResponse, error) |
| 21 | + DeleteNexusOperationExecution(context.Context, *workflowservice.DeleteNexusOperationExecutionRequest) (*workflowservice.DeleteNexusOperationExecutionResponse, error) |
| 22 | +} |
| 23 | + |
| 24 | +type frontendHandler struct { |
| 25 | + config *Config |
| 26 | + logger log.Logger |
| 27 | + namespaceRegistry namespace.Registry |
| 28 | +} |
| 29 | + |
| 30 | +func NewFrontendHandler( |
| 31 | + config *Config, |
| 32 | + logger log.Logger, |
| 33 | + namespaceRegistry namespace.Registry, |
| 34 | +) FrontendHandler { |
| 35 | + return &frontendHandler{ |
| 36 | + config: config, |
| 37 | + logger: logger, |
| 38 | + namespaceRegistry: namespaceRegistry, |
| 39 | + } |
| 40 | +} |
| 41 | + |
| 42 | +func (h *frontendHandler) StartNexusOperationExecution(context.Context, *workflowservice.StartNexusOperationExecutionRequest) (*workflowservice.StartNexusOperationExecutionResponse, error) { |
| 43 | + return nil, serviceerror.NewUnimplemented("StartNexusOperationExecution not implemented") |
| 44 | +} |
| 45 | + |
| 46 | +func (h *frontendHandler) DescribeNexusOperationExecution(context.Context, *workflowservice.DescribeNexusOperationExecutionRequest) (*workflowservice.DescribeNexusOperationExecutionResponse, error) { |
| 47 | + return nil, serviceerror.NewUnimplemented("DescribeNexusOperationExecution not implemented") |
| 48 | +} |
| 49 | + |
| 50 | +func (h *frontendHandler) PollNexusOperationExecution(context.Context, *workflowservice.PollNexusOperationExecutionRequest) (*workflowservice.PollNexusOperationExecutionResponse, error) { |
| 51 | + return nil, serviceerror.NewUnimplemented("PollNexusOperationExecution not implemented") |
| 52 | +} |
| 53 | + |
| 54 | +func (h *frontendHandler) ListNexusOperationExecutions(context.Context, *workflowservice.ListNexusOperationExecutionsRequest) (*workflowservice.ListNexusOperationExecutionsResponse, error) { |
| 55 | + return nil, serviceerror.NewUnimplemented("ListNexusOperationExecutions not implemented") |
| 56 | +} |
| 57 | + |
| 58 | +func (h *frontendHandler) CountNexusOperationExecutions(context.Context, *workflowservice.CountNexusOperationExecutionsRequest) (*workflowservice.CountNexusOperationExecutionsResponse, error) { |
| 59 | + return nil, serviceerror.NewUnimplemented("CountNexusOperationExecutions not implemented") |
| 60 | +} |
| 61 | + |
| 62 | +func (h *frontendHandler) RequestCancelNexusOperationExecution(context.Context, *workflowservice.RequestCancelNexusOperationExecutionRequest) (*workflowservice.RequestCancelNexusOperationExecutionResponse, error) { |
| 63 | + return nil, serviceerror.NewUnimplemented("RequestCancelNexusOperationExecution not implemented") |
| 64 | +} |
| 65 | + |
| 66 | +func (h *frontendHandler) TerminateNexusOperationExecution(context.Context, *workflowservice.TerminateNexusOperationExecutionRequest) (*workflowservice.TerminateNexusOperationExecutionResponse, error) { |
| 67 | + return nil, serviceerror.NewUnimplemented("TerminateNexusOperationExecution not implemented") |
| 68 | +} |
| 69 | + |
| 70 | +func (h *frontendHandler) DeleteNexusOperationExecution(context.Context, *workflowservice.DeleteNexusOperationExecutionRequest) (*workflowservice.DeleteNexusOperationExecutionResponse, error) { |
| 71 | + return nil, serviceerror.NewUnimplemented("DeleteNexusOperationExecution not implemented") |
| 72 | +} |
0 commit comments