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.
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.