Files
tasks/api/routing/v1/extension.go-helpers.pb.go
Roey BermanandGitHub c788728852 CHASM client codegen (#8398)
## What changed?

Added a protoc plugin to generate client for internal CHASM requests to
the history service.
A CHASM library can now define its own set of gRPC services and register
a handler for those.

I had to modify the history client files to be generic, which broke the
mock generation, so I had to hand code the tests there, which IMHO is
actually nicer than the way they were with mocks.

Also opted out of mock generation for CHASM services, there's just not
enough value there.

**NOTE**: Instead of creating three separate clients, I generated a
single layered client, with a constructor that is DI friendly. There
doesn't seem to be a good enough reason to break this out into separate
clients or make client construction configurable (for now).

**NOTE**: We can also get rid of the genrpcwrappers script eventually
and use the protoc plugin approach for all services, I decided not to do
that here though to reduce scope.

For a preview of the generated file see:
-
https://github.com/bergundy/temporal/blob/3a89614a9097eca9061b5f347c01eda735534bbe/chasm/lib/activity/proto/v1/service.proto
-
https://github.com/bergundy/temporal/blob/3a89614a9097eca9061b5f347c01eda735534bbe/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go
 
## Why?

Keep all CHASM library functionality contained.

## How did you test it?
- [ ] built
2025-10-02 16:13:39 +00:00

44 lines
1.1 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package routing
import (
"google.golang.org/protobuf/proto"
)
// Marshal an object of type RoutingOptions to the protobuf v3 wire format
func (val *RoutingOptions) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type RoutingOptions from the protobuf v3 wire format
func (val *RoutingOptions) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *RoutingOptions) Size() int {
return proto.Size(val)
}
// Equal returns whether two RoutingOptions 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 *RoutingOptions) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *RoutingOptions
switch t := that.(type) {
case *RoutingOptions:
that1 = t
case RoutingOptions:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}