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]>
81 lines
2.0 KiB
Go
81 lines
2.0 KiB
Go
// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
|
|
package testspb
|
|
|
|
import (
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// Marshal an object of type TestRequest to the protobuf v3 wire format
|
|
func (val *TestRequest) Marshal() ([]byte, error) {
|
|
return proto.Marshal(val)
|
|
}
|
|
|
|
// Unmarshal an object of type TestRequest from the protobuf v3 wire format
|
|
func (val *TestRequest) Unmarshal(buf []byte) error {
|
|
return proto.Unmarshal(buf, val)
|
|
}
|
|
|
|
// Size returns the size of the object, in bytes, once serialized
|
|
func (val *TestRequest) Size() int {
|
|
return proto.Size(val)
|
|
}
|
|
|
|
// Equal returns whether two TestRequest values are equivalent by recursively
|
|
// comparing the message's fields.
|
|
// For more information see the documentation for
|
|
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
|
|
func (this *TestRequest) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
var that1 *TestRequest
|
|
switch t := that.(type) {
|
|
case *TestRequest:
|
|
that1 = t
|
|
case TestRequest:
|
|
that1 = &t
|
|
default:
|
|
return false
|
|
}
|
|
|
|
return proto.Equal(this, that1)
|
|
}
|
|
|
|
// Marshal an object of type TestResponse to the protobuf v3 wire format
|
|
func (val *TestResponse) Marshal() ([]byte, error) {
|
|
return proto.Marshal(val)
|
|
}
|
|
|
|
// Unmarshal an object of type TestResponse from the protobuf v3 wire format
|
|
func (val *TestResponse) Unmarshal(buf []byte) error {
|
|
return proto.Unmarshal(buf, val)
|
|
}
|
|
|
|
// Size returns the size of the object, in bytes, once serialized
|
|
func (val *TestResponse) Size() int {
|
|
return proto.Size(val)
|
|
}
|
|
|
|
// Equal returns whether two TestResponse values are equivalent by recursively
|
|
// comparing the message's fields.
|
|
// For more information see the documentation for
|
|
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
|
|
func (this *TestResponse) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
var that1 *TestResponse
|
|
switch t := that.(type) {
|
|
case *TestResponse:
|
|
that1 = t
|
|
case TestResponse:
|
|
that1 = &t
|
|
default:
|
|
return false
|
|
}
|
|
|
|
return proto.Equal(this, that1)
|
|
}
|