You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create a custom function that becomes a part of the generated code. Below is my IDL file. I want BatchRequest1 to be handled by a custom function. This function should then be integrated into the generated code. How can I accomplish this?
I couldn't puzzle out exactly what you want, as there was no example generated code included.
You could add that to help others understand, but I have to warn you gogoprotobuf is deprecated
Good luck
Hi,
I need to create a custom function that becomes a part of the generated code. Below is my IDL file. I want BatchRequest1 to be handled by a custom function. This function should then be integrated into the generated code. How can I accomplish this?
syntax = "proto3";
package cockroach.roachpb;
option go_package = "github.com/cockroachdb/cockroach/pkg/kv/kvpb";
import "gogoproto/gogo.proto";
import "google/protobuf/descriptor.proto";
// Define a custom option to specify whether a message should be intercepted.
extend google.protobuf.MessageOptions {
bool intercept = 1000;
}
message BatchRequest1 {
option (intercept) = true; // Annotate the message with the custom option to specify interception.
string key1 = 1;
}
message BatchResponse1 {
string key2 = 1;
}
// Batch and RangeFeed service implemented by nodes for KV API requests.
service Internal1 {
rpc Batch1 (BatchRequest1) returns (BatchResponse1) {}
}
Thank you all.
The text was updated successfully, but these errors were encountered: