Files
tasks/api/enums/v1/nexus.pb.go
Roey BermanandGitHub 784deaf680 Nexus E2E implementation (#5779)
## What changed?

[Operation state
machine](https://github.com/temporalio/temporal/pull/5545)
[Nexus command
processing](https://github.com/temporalio/temporal/pull/5546)
[Implement Nexus start operation task
executors](https://github.com/temporalio/temporal/pull/5686)
[Implement Nexus async completion
endpoint](https://github.com/temporalio/temporal/pull/5735)

Upgrade API to support full E2E flow
https://github.com/temporalio/api/pull/363
2024-04-23 17:00:52 +00:00

223 lines
9.9 KiB
Go

// The MIT License
//
// Copyright (c) 2024 Temporal Technologies Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by protoc-gen-go. DO NOT EDIT.
// plugins:
// protoc-gen-go
// protoc
// source: temporal/server/api/enums/v1/nexus.proto
package enums
import (
reflect "reflect"
"strconv"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type NexusOperationState int32
const (
// Default value, unspecified state.
NEXUS_OPERATION_STATE_UNSPECIFIED NexusOperationState = 0
// Operation is in the queue waiting to be executed or is currently executing.
NEXUS_OPERATION_STATE_SCHEDULED NexusOperationState = 1
// Operation has failed with a retryable error and is backing off before the next attempt.
NEXUS_OPERATION_STATE_BACKING_OFF NexusOperationState = 2
// Operation was started and will complete asynchronously.
NEXUS_OPERATION_STATE_STARTED NexusOperationState = 3
// Operation succeeded.
// This may happen either as a response to a start request or as reported via callback.
NEXUS_OPERATION_STATE_SUCCEEDED NexusOperationState = 4
// Operation failed either when a start request encounters a non-retryable error or as reported via callback.
NEXUS_OPERATION_STATE_FAILED NexusOperationState = 5
// Operation completed as canceled (may have not ever been delivered).
// This may happen either as a response to a start request or as reported via callback.
NEXUS_OPERATION_STATE_CANCELED NexusOperationState = 6
// Operation timed out - exceeded the user supplied schedule-to-close timeout.
// Any attempts to complete the operation in this state will be ignored.
NEXUS_OPERATION_STATE_TIMED_OUT NexusOperationState = 7
)
// Enum value maps for NexusOperationState.
var (
NexusOperationState_name = map[int32]string{
0: "NEXUS_OPERATION_STATE_UNSPECIFIED",
1: "NEXUS_OPERATION_STATE_SCHEDULED",
2: "NEXUS_OPERATION_STATE_BACKING_OFF",
3: "NEXUS_OPERATION_STATE_STARTED",
4: "NEXUS_OPERATION_STATE_SUCCEEDED",
5: "NEXUS_OPERATION_STATE_FAILED",
6: "NEXUS_OPERATION_STATE_CANCELED",
7: "NEXUS_OPERATION_STATE_TIMED_OUT",
}
NexusOperationState_value = map[string]int32{
"NEXUS_OPERATION_STATE_UNSPECIFIED": 0,
"NEXUS_OPERATION_STATE_SCHEDULED": 1,
"NEXUS_OPERATION_STATE_BACKING_OFF": 2,
"NEXUS_OPERATION_STATE_STARTED": 3,
"NEXUS_OPERATION_STATE_SUCCEEDED": 4,
"NEXUS_OPERATION_STATE_FAILED": 5,
"NEXUS_OPERATION_STATE_CANCELED": 6,
"NEXUS_OPERATION_STATE_TIMED_OUT": 7,
}
)
func (x NexusOperationState) Enum() *NexusOperationState {
p := new(NexusOperationState)
*p = x
return p
}
func (x NexusOperationState) String() string {
switch x {
case NEXUS_OPERATION_STATE_UNSPECIFIED:
return "Unspecified"
case NEXUS_OPERATION_STATE_SCHEDULED:
return "Scheduled"
case NEXUS_OPERATION_STATE_BACKING_OFF:
return "BackingOff"
case NEXUS_OPERATION_STATE_STARTED:
return "Started"
case NEXUS_OPERATION_STATE_SUCCEEDED:
return "Succeeded"
case NEXUS_OPERATION_STATE_FAILED:
return "Failed"
case NEXUS_OPERATION_STATE_CANCELED:
return "Canceled"
case NEXUS_OPERATION_STATE_TIMED_OUT:
return "TimedOut"
default:
return strconv.Itoa(int(x))
}
}
func (NexusOperationState) Descriptor() protoreflect.EnumDescriptor {
return file_temporal_server_api_enums_v1_nexus_proto_enumTypes[0].Descriptor()
}
func (NexusOperationState) Type() protoreflect.EnumType {
return &file_temporal_server_api_enums_v1_nexus_proto_enumTypes[0]
}
func (x NexusOperationState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use NexusOperationState.Descriptor instead.
func (NexusOperationState) EnumDescriptor() ([]byte, []int) {
return file_temporal_server_api_enums_v1_nexus_proto_rawDescGZIP(), []int{0}
}
var File_temporal_server_api_enums_v1_nexus_proto protoreflect.FileDescriptor
var file_temporal_server_api_enums_v1_nexus_proto_rawDesc = []byte{
0x0a, 0x28, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e,
0x65, 0x78, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x74, 0x65, 0x6d, 0x70,
0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2a, 0xbb, 0x02, 0x0a, 0x13, 0x4e, 0x65, 0x78,
0x75, 0x73, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
0x12, 0x25, 0x0a, 0x21, 0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54,
0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x4e, 0x45, 0x58, 0x55, 0x53,
0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45,
0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21,
0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x46,
0x46, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45,
0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41,
0x52, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x23, 0x0a, 0x1f, 0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f,
0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f,
0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, 0x4e,
0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53,
0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x12, 0x22, 0x0a,
0x1e, 0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10,
0x06, 0x12, 0x23, 0x0a, 0x1f, 0x4e, 0x45, 0x58, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41,
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x44,
0x5f, 0x4f, 0x55, 0x54, 0x10, 0x07, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x6f, 0x2e, 0x74, 0x65, 0x6d,
0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x6e, 0x75,
0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_temporal_server_api_enums_v1_nexus_proto_rawDescOnce sync.Once
file_temporal_server_api_enums_v1_nexus_proto_rawDescData = file_temporal_server_api_enums_v1_nexus_proto_rawDesc
)
func file_temporal_server_api_enums_v1_nexus_proto_rawDescGZIP() []byte {
file_temporal_server_api_enums_v1_nexus_proto_rawDescOnce.Do(func() {
file_temporal_server_api_enums_v1_nexus_proto_rawDescData = protoimpl.X.CompressGZIP(file_temporal_server_api_enums_v1_nexus_proto_rawDescData)
})
return file_temporal_server_api_enums_v1_nexus_proto_rawDescData
}
var file_temporal_server_api_enums_v1_nexus_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_temporal_server_api_enums_v1_nexus_proto_goTypes = []interface{}{
(NexusOperationState)(0), // 0: temporal.server.api.enums.v1.NexusOperationState
}
var file_temporal_server_api_enums_v1_nexus_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_temporal_server_api_enums_v1_nexus_proto_init() }
func file_temporal_server_api_enums_v1_nexus_proto_init() {
if File_temporal_server_api_enums_v1_nexus_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_temporal_server_api_enums_v1_nexus_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_temporal_server_api_enums_v1_nexus_proto_goTypes,
DependencyIndexes: file_temporal_server_api_enums_v1_nexus_proto_depIdxs,
EnumInfos: file_temporal_server_api_enums_v1_nexus_proto_enumTypes,
}.Build()
File_temporal_server_api_enums_v1_nexus_proto = out.File
file_temporal_server_api_enums_v1_nexus_proto_rawDesc = nil
file_temporal_server_api_enums_v1_nexus_proto_goTypes = nil
file_temporal_server_api_enums_v1_nexus_proto_depIdxs = nil
}