mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? Added Chasm RPC handler foundation and interceptor. Added test as use case demo. ## Why? The Chasm RPC handler will be used as the abstraction layer for future work. A grpc interceptor was added to intercept requests to process boilerplate code so the handlers don't have to regurgitate it. Please look at the added test as it demonstrates how the RPC handler is registered and a request gets processed. ## How did you test it? - [X] built - [X] run locally and tested manually - [X] covered by existing tests - [X] added new unit test(s) - [ ] added new functional test(s) ## Potential risks There is a [future ticket](https://temporalio.atlassian.net/browse/ACT-69) to refactor all history RPC calls to start using the interceptor as to avoid boilerplate code. This does need a deeper discussion with the team and we also need to figure out how to identify the incoming RPC request so we can extract namespace etc. properly. --------- Co-authored-by: Roey Berman <[email protected]>
70 lines
3.2 KiB
Go
70 lines
3.2 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// plugins:
|
|
// protoc-gen-go
|
|
// protoc
|
|
// source: temporal/server/chasm/lib/tests/proto/v1/service.proto
|
|
|
|
package testspb
|
|
|
|
import (
|
|
reflect "reflect"
|
|
unsafe "unsafe"
|
|
|
|
_ "go.temporal.io/server/api/routing/v1"
|
|
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)
|
|
)
|
|
|
|
var File_temporal_server_chasm_lib_tests_proto_v1_service_proto protoreflect.FileDescriptor
|
|
|
|
const file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc = "" +
|
|
"\n" +
|
|
"6temporal/server/chasm/lib/tests/proto/v1/service.proto\x12(temporal.server.chasm.lib.tests.proto.v1\x1a?temporal/server/chasm/lib/tests/proto/v1/request_response.proto\x1a.temporal/server/api/routing/v1/extension.proto2\x8c\x01\n" +
|
|
"\vTestService\x12}\n" +
|
|
"\x04Test\x125.temporal.server.chasm.lib.tests.proto.v1.TestRequest\x1a6.temporal.server.chasm.lib.tests.proto.v1.TestResponse\"\x06\x92\xc4\x03\x02\b\x01B;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3"
|
|
|
|
var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = []any{
|
|
(*TestRequest)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestRequest
|
|
(*TestResponse)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestResponse
|
|
}
|
|
var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = []int32{
|
|
0, // 0: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:input_type -> temporal.server.chasm.lib.tests.proto.v1.TestRequest
|
|
1, // 1: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:output_type -> temporal.server.chasm.lib.tests.proto.v1.TestResponse
|
|
1, // [1:2] is the sub-list for method output_type
|
|
0, // [0:1] 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_chasm_lib_tests_proto_v1_service_proto_init() }
|
|
func file_temporal_server_chasm_lib_tests_proto_v1_service_proto_init() {
|
|
if File_temporal_server_chasm_lib_tests_proto_v1_service_proto != nil {
|
|
return
|
|
}
|
|
file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 0,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes,
|
|
DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs,
|
|
}.Build()
|
|
File_temporal_server_chasm_lib_tests_proto_v1_service_proto = out.File
|
|
file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = nil
|
|
file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = nil
|
|
}
|